Skip to content

Commit 306fa25

Browse files
Smaller default retry count
See phpredis#1908
1 parent 92d5e30 commit 306fa25

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

README.markdown

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ redis.session.locking_enabled = 1
9393
redis.session.lock_expire = 60
9494
; How long to wait between attempts to acquire lock, in microseconds (µs)?. Defaults to: 20000
9595
redis.session.lock_wait_time = 50000
96-
; Maximum number of times to retry (-1 means infinite). Defaults to: 1000
96+
; Maximum number of times to retry (-1 means infinite). Defaults to: 100
9797
redis.session.lock_retries = 2000
9898
~~~
9999

redis.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ PHP_INI_BEGIN()
103103
/* redis session */
104104
PHP_INI_ENTRY("redis.session.locking_enabled", "0", PHP_INI_ALL, NULL)
105105
PHP_INI_ENTRY("redis.session.lock_expire", "0", PHP_INI_ALL, NULL)
106-
PHP_INI_ENTRY("redis.session.lock_retries", "1000", PHP_INI_ALL, NULL)
106+
PHP_INI_ENTRY("redis.session.lock_retries", "100", PHP_INI_ALL, NULL)
107107
PHP_INI_ENTRY("redis.session.lock_wait_time", "20000", PHP_INI_ALL, NULL)
108108
PHP_INI_END()
109109

redis_session.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ static int lock_acquire(RedisSock *redis_sock, redis_session_lock_status *lock_s
237237
/* Maximum number of times to retry (-1 means infinite) */
238238
retries = INI_INT("redis.session.lock_retries");
239239
if (retries == 0) {
240-
retries = 1000;
240+
retries = 100;
241241
}
242242

243243
/* How long should the lock live (in seconds) */

0 commit comments

Comments
 (0)