I've enabled redis for session, have the latest extension and lib code from github, and I'm noticing some requests take around 30 seconds – and this is happening pretty frequently, and it's always redis which is to blame.
Here are 3 transaction traces from newrelic, they look pretty much the same to me:
http://imgur.com/JQUzheJ,0sCqUni,3L4PJAX
I am using the following settings in redis:
<redis_session>
<host>127.0.0.1</host>
<port>6379</port>
<password></password>
<timeout>2.5</timeout>
<persistent></persistent>
<db>2</db>
<compression_threshold>2048</compression_threshold>
<compression_lib>lzf</compression_lib>
<log_level>4</log_level>
<!-- maximum number of processes that can wait for a lock on one session; for large production clusters, set this to at least 10% of the number of PHP processes -->
<max_concurrency>12</max_concurrency>
<!-- seconds to wait for a session lock in the frontend; not as critical as admin -->
<break_after_frontend>5</break_after_frontend>
<break_after_adminhtml>30</break_after_adminhtml>
<!-- Bots get shorter session lifetimes. 0 to disable -->
<bot_lifetime>7200</bot_lifetime>
</redis_session>
At the moment, only one frontend server is being used for magento.
Thanks!
Best Answer
It could be a dozen different things, and without a full overview of your entire server at that point in time, it isn't going to be possible to give a definitive answer.
It could be,
redis-server
process at 100% CPUThe list could go on and on. What you need is full and proper monitoring of your entire server, so that you can see exactly what is happening to make a diagnosis.
That includes graphing every application with Munin, historical logging with the Atop daemon, logging and centralisation of log data into a single dashboard.
New Relic is a nice tool, whilst useful for some identification of issues, its not necessarily the best tool to try and have full visibility of the cause of issues.
Easiest place to start would be to check if Redis needs more memory,
Compare the peak memory with the limit you have defined.
NB. Your hosting provider should be able to answer this question in an instant, I would definitely suggest asking for their input.