Skip to content

Purpose of ECHO commands? #2609

Answered by michael-grunder
gskema asked this question in Q&A
Discussion options

You must be logged in to vote

PHPRedis sends this ECHO command when retreiving a persistent connection from the connection pool depending on the value of redis.echo_check_liveness in redis.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 ECHO challenges:

redis.pconnect.echo_check_liveness = 0

There is another related setting that will attempt to check the socket for unconsumed bytes

# Value Expla…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by gskema
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants