Magento 1.9 – Intermittent 503 Errors with Redis Enabled

cm-redissessionmagento-1.9redis

I recently switched a store cache and session backend to Redis 3.0.3. I used the Cm_Cache_Backend_Redis and Cm_RedisSession extensions and the example configs provided. It works as expected and Redis stores the sessions and cache in 2 separate DB's. However, the site gets intermittent Magento 503 service unavailable errors (as reported by customers and observed by loading several pages at once). If I disable the extensions and go back to the standard file session_save's the problem goes away and can no longer be reproduced.

Is there some tuning that needs to be done to Redis to handle higher volume? Has anyone else every experienced this?

Best Answer

You're likely hitting max_concurrency. Colin Mollenhour has made significant updates to the Redis integrations (and his Redis Session integration) in his Github repo modules.

I suggest you upgrade to the most recent version, which batches SUNIONs to avoid massive wait times.

Aside from this I've seen max_concurrency hit while bots are crawling. Because of this we've, on occasion, made updates to the Bot settings in Collin's module.

See here for more information:

https://github.com/colinmollenhour/Cm_RedisSession#bot-detection

Related Topic