colinmollenhour/Zend_Cache_Backend_Redis — Issue #3: Runaway apache with latest version
Author: DarkNova
Created: 2011-11-14 22:38:32+00:00
State: open

Hello,

I've been using this redis cache backend with Magento for a few weeks in production and its been great -- it really speeds operations up. This weekend, though, I upgraded Magento to 1.6.1.0 and also upgraded Zend_Cache_Backend_Redis to the latest version (Nov 10, 2011 commit).

Today I experienced a problem that I was able to reproduce in 3 different places: saving Magento's Configuration->General->Web options page, refreshing the "Layouts" cache, and clicking the "Flush Magento Cache" button. What happened was the Apache process went to 100% CPU and started using more and more memory. I eventually killed the process when it reached 10GB of RAM.

I fixed the problem my using redis-cli to do "flushall". After that, I was able to do all 3 operations that had resulted in the runaway process before.

At the time of the problem, my redis cache, which I use only for Magento with Zend_Cache_Backend_Redis, had 40000-50000 keys, and used about 400MB memory.

My config looks like:

Zend_Cache_Backend_Redis

/var/run/redis.sock
6379
2
0
86400

I was previously using Magento 1.5.1.0 and the Sept 2, 2011 version of Zend_Cache_Backend_Redis, with no noticeable problems.

Thanks for writing this, and let me know if you need any more information.

Nick