Purpose of ECHO commands? #2609
-
|
I ran In my case it was around let's say 4000 ECHO commands and 20000 other expected commands issued by application within ~5 seconds. It this ECHO commands issued internally by phpredis extension and if yes, why? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
PHPRedis sends this The reason we do this is that years ago people were having the issue where the persistent connection would go "out of sync" and return the wrong data. This can happen in rare edge cases like a transaction failing halfway through. I actually found what I believe to be the underlying cause of going out of sync but haven't had a chance to fix it yet. This will disable the redis.pconnect.echo_check_liveness = 0There is another related setting that will attempt to check the socket for unconsumed bytes # Value Explanation
# ----- ----------------------------------------------------------------
# 0 Don't execute new logic at all.
# 1 Abort and close the socket if we find unconsumed bytes in the
# read buffer.
# 2 Seek to the end of our read buffer if we find unconsumed bytes
# and then poll the socket FD to detect if we're still readable
# in which case we fail and close the socket.
redis.pconnect.pool_detect_dirty = 0Most people don't have any issues disabling the Fixing the underlying problem with aborted transactions is on my TODO list I just haven't implemented it yet. |
Beta Was this translation helpful? Give feedback.
PHPRedis sends this
ECHOcommand when retreiving a persistent connection from the connection pool depending on the value ofredis.echo_check_livenessinredis.ini.The reason we do this is that years ago people were having the issue where the persistent connection would go "out of sync" and return the wrong data. This can happen in rare edge cases like a transaction failing halfway through.
I actually found what I believe to be the underlying cause of going out of sync but haven't had a chance to fix it yet.
This will disable the
ECHOchallenges:redis.pconnect.echo_check_liveness = 0There is another related setting that will attempt to check the socket for unconsumed bytes
# Value Expla…