0

I'm facing some problems with the frontend generation when I enable Redis cache. Basically, the path to some static contents is wrong, just like the example below for the logo image.

<img src="//skin/frontend">

My setup is:

  • Magento 1.9.1
  • NGINX + PHP7-FPM
  • Redis

It was running well for about 5 days, but broke today. When I disable Redis cache, the site runs well, without any problem.

Does anyone ever faced something like that?

Thanks.

1 Answer 1

0

Its due to the radis cache is not flushed correctly. You need to flush your redis cache along with magento cache.

$ redis-cli
$redis> flushall
OK
$redis> exit

Also after this clear magento cache.

After that you need to check code in local.xml for redis cache as below:

     <cache> 
        <backend>Cm_Cache_Backend_Redis</backend>
        <backend_options>
                <server>127.0.0.1</server> 
                <port>6379</port>
                <persistent></persistent>
                <database>0</database>
                <password></password> 
                <force_standalone>0</force_standalone>  
                <connect_retries>10</connect_retries>    
                <read_timeout></read_timeout>       
                <automatic_cleaning_factor>0</automatic_cleaning_factor> 
                <compress_data>1</compress_data>  
                <compress_tags>1</compress_tags> 
                <compress_threshold>20480</compress_threshold> 
                <compression_lib>gzip</compression_lib>
        </backend_options>
     </cache>

Also verify your server port on which you try to connect redis cache.

7
  • Thanks a lot. My config is exactly the same as yours, except for connect_retries = 1. Do you have any clues on how to avoid this? Should I perform Redis cleanup regularly? Aug 3, 2016 at 12:43
  • You need to flush cache periodically or you need to talk with your host about this problem. He can talk host about it. Aug 3, 2016 at 12:51
  • I manage the whole server, but I can't find a solution to this. I already dig the logs, but with no success. Aug 3, 2016 at 12:57
  • I just recently solved same issue issue with cleaning radis cache and magento cache. Have you check on which port radis is working? Aug 3, 2016 at 13:02
  • Yes. The port is correct. Aug 3, 2016 at 13:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.