-
Notifications
You must be signed in to change notification settings - Fork 121
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
frequent read error on connection in backend only #50
Comments
One thought I'd had was to possibly try forcing Cm_RedisSession to not use phpredis (since some similar-ish Cm_Cache_Backend_Redis issues are apparently solved by forcing it to not use phpredis), but there's not an option I can find for it. |
@jonathanvaughn The option is called |
I didn't see it anywhere in Cm_RedisSession though - if we set that will it be passed through to CRedis? |
Oops, my bad, that doesn't seem to be an option for sessions. Just for the cache backend. |
Yeah, though it's exactly the first thing I looked for when first trying to debug this :D |
I believe I have previously seen @colinmollenhour mention this is a common side effect of AJAX in the media manager. (Which means it is annoying and pollutes the logs but isn’t outright a sign of problems.) |
We're getting "an error processing your request" Magento error page with stack trace though, so... it breaks stuff. -_- Honestly not sure whether the client is seeing this entirely randomly or randomly on a specific page though, now that you mention it. I'll find out ... |
On second thought, that stacktrace indicates an issue with the cache backend. Is there a particular reason you suspect sessions to be the problem? |
Oops, I think I posted an old / wrong stack. Let me find and update the OP. edit: done. |
After reading some of @colinmollenhour's answers at the phpredis repository, you may want to try to add |
Thanks, we may try that. The obvious just occurred to me: I could just disable phpredis module and graceful Apache, that would also force standalone, surely? This particular site is only using Redis via Credis and it's Cm_* friends, so assuming Cm_RedisSession properly falls back to standalone on it's own this should be testable without code changes. |
Yes, disabling the extension and reloading Apache should have the desired effect safely. phpredis does offer significantly better performance though. As to the read errors I really don't know.. I see these myself sometimes but they are very far and few between (like once or twice a week with a very busy server). So, I don't really know what to make of it.. If you're really determined to get to the bottom of it a couple things you could try:
I can't reproduce the issue anywhere near enough to do the above... Sorry I don't have any better ideas.. It seems like in general Redis is just not 100% reliable when it comes to requests/responses.. You just don't ever see this issue with MySQL, MongoDb, etc.. At least not without some explanation and an error in the log files to accompany it.. |
I can confirm this issue. We see this also. Continuous error: Read error on connection and logged out backend (after upgrade) Since upgrade (22-1-2-15) we see many logging ** Next exception 'CredisException' with message 'read error on connection' ** and users complaining about being logged out in backend Logging below Next exception 'CredisException' with message 'read error on connection' in /home/shirts350/domains/webstore.com/public_html/.modman/Cm_RedisSession/lib/Credis/Client.php:919 |
@colinmollenhour is there maybe a way to debug all calls and replies from REDIS? Maybe this way I can help to debug this issue /// see what is going on |
Yes, use:
Also set the log_level to 7 in your config and you will get a lot of logging in redis_session.log |
Hi, our update ** we upgraded REDIS and PHPREDIS .... ** turned on logging, but don't see any errors ** the problem however persists, users are kicked out of backend frequently .... and as I understand also sometimes in frontend cart-> checkout ** Turning off redis session seems to fix the issue |
Perhaps check that the session data is not growing to be unusually large due to some bug or unruly extension. Enable compression if not already to reduce data transfer. Otherwise, I don't know what the issue would be attributed to and I'd consider trying another backend that has more reliable connections than Redis such as MySQL (it can be configured to use a separate database/connection). |
I hope this is solved for us now. Still waiting.... to see it again We had persistent connection turned on @ same server, different database (now off) http://stackoverflow.com/questions/4022952/set-session-time-out-limit-for-magento-frontend Hope our issue is solved now |
We are having repeated problems with the admin backend in Magento, but not any frequent problems on the front end. The front end is handled on two separate nodes, and a third runs the backend, all sharing common Redis caches (separate instances for Sessions, Magento Cache, and Full Page Cache). The Redis instances are on a 4th server.
There isn't a large number of admin requests occurring (typically only one or two people using it) and the other nodes appear to communicate to Redis just fine. They're all Rackspace cloud performance 8GB servers in the same DC.
Since this only happens in the backend, I'm not sure if it's just a backend triggered issue, or if it's the server, but I've tried monitoring connectivity to redis from that server and it never fails (and the cache / full page cache never error, just sessions).
Any suggestions on what to look for / instrument to investigate this? I tried adding a call to a shell command to get the number of active / time_wait / etc Redis connections when the error occurs, but there's never more than a couple in total on that server, so I'm pretty sure its not any kind of socket/descriptor starvation.
edit: replaced stacktrace with correct one
The text was updated successfully, but these errors were encountered: