【发布时间】:2019-12-20 14:06:14
【问题描述】:
phpredis 会话锁定在内部如何工作?它是否在内部存储一个值并继续检查它?如果我有一个很高的redis.session.lock_retries,如果需要 10 秒才能获得锁定并且必须尝试数千次,这是否会给服务器带来负载?
以下是配置参数。
; Should the locking be enabled? Defaults to: 0.
redis.session.locking_enabled = 1
; How long should the lock live (in seconds)? Defaults to: value of max_execution_time.
redis.session.lock_expire = 60
; How long to wait between attempts to acquire lock, in microseconds (µs)?. Defaults to: 2000
redis.session.lock_wait_time = 50000
; Maximum number of times to retry (-1 means infinite). Defaults to: 10
redis.session.lock_retries = 10
【问题讨论】: