Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using connection that the redis server has requested to be closed resulting in "read error on connection" #1058

Closed
tom-pryor opened this issue Dec 15, 2016 · 3 comments

Comments

@tom-pryor
Copy link

tom-pryor commented Dec 15, 2016

This is a result of us investigating the issue mentioned in #70 (read error on connection)

We captured Redis traffic from our live servers and investigated time periods when our error reporting system captured the read error on connection exceptions. What appears to be happening is that the Redis server sends a message to the client saying it wants to close the TCP connection. However, the client then sends a subsequent TCP packet containing a GET command a few seconds AFTER receiving the packet with the FIN flag set from the Redis server. The Redis server then responds with a RST packet because it's already sent a FIN packet for that connection. The "read error on connection" error is then fired.

Here's an example (172.31.20.xxx is the Redis Server. 172.31.13.xxx is the phpredis client):

phpredis_closed

We've not figured out why the Redis server is closing the connection, but it appears the phpredis is trying to use the connection after the server has closed it.

@tom-pryor
Copy link
Author

Just as a quick update, we suspect this might be caused by: #643

We're going to try compiling a custom version of phpredis with that code removed to see if it fixes the problem (issue it addresses has been fixed upstream in php)

@michael-grunder
Copy link
Member

Thanks for the investigation and update. #70 is a bug that simply refuses to die.

What version of PHP are you using? I wonder if the problem with php streams was fixed upstream and now the workaround is no longer necessary for newer versions of php.

@yatsukhnenko
Copy link
Member

Old issue without any activity for a long time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants