Hello,
We used to use the library in one of our applications and we always got deadlocks when under certain load.
Because of the nature of such problems, it was extraordinary difficult to find why this happens, we have changed our code multiple times and never suspected the problem is caused by an underlaying library.
In one of the debug sessions, using strace we could see the process is stuck doing a SETNX command. Reading about the command at https://redis.io/commands/setnx#design-pattern-locking-with-codesetnxcode says it should not be used for this purposes anymore. Digging further to see what piece of code uses this command, we ended up finding https://github.com/arvenil/mutex/blob/master/src/Lock/PredisRedisLock.php#L45
Maybe you should look into it and find a better alternative.
Best.
Hello,
We used to use the library in one of our applications and we always got deadlocks when under certain load.
Because of the nature of such problems, it was extraordinary difficult to find why this happens, we have changed our code multiple times and never suspected the problem is caused by an underlaying library.
In one of the debug sessions, using
stracewe could see the process is stuck doing aSETNXcommand. Reading about the command at https://redis.io/commands/setnx#design-pattern-locking-with-codesetnxcode says it should not be used for this purposes anymore. Digging further to see what piece of code uses this command, we ended up finding https://github.com/arvenil/mutex/blob/master/src/Lock/PredisRedisLock.php#L45Maybe you should look into it and find a better alternative.
Best.