Magento site is frequently getting CACHE issue and failing to serve CSS, site is getting broken page
Magento site is frequently getting CACHE issue and failing to serve CSS, site is getting broken page.
Once after flush redis cache or restart of redis is bringing site into normal position.
Below cache technologies being integrated for magento web site.
- Magento: 1.9.1.0
- Redis: 3.0.5
- Lesti FPC
Server have two redis instance running with Port No: 6379 and 6380
Site is configured with redis cache for magento backend and full page cache (FPC site cache), Redis's 6379 instance is configured for both cache setup but redis database are different.
Configurations as below:
backend redis configurations in local.xml
[![<cache>
<backend>Cm_Cache_Backend_Redis</backend>
<backend_options>
<server>127.0.0.1</server>
<port>6380</port>
<persistent>cache-fpc</persistent>
<database>1</database>
<password></password>
<force_standalone>1</force_standalone>
<connect_retries>1</connect_retries>
<lifetimelimit>86400</lifetimelimit>
<read_timeout>10</read_timeout>
<compress_data>1</compress_data>
<compress_tags>1</compress_tags>
<compress_data>gzip</compress_data>
</backend_options>
</cache>][1]][1]
FPC site cache redis configurations in fpc.
<fpc>
<lifetime>86400</lifetime>
<backend>Cm_Cache_Backend_Redis</backend>
<backend_options>
<server>127.0.0.1</server>
<port>6380</port>
<persistent>cache-fpc</persistent>
<database>1</database>
<password></password>
<force_standalone>1</force_standalone>
<connect_retries>1</connect_retries>
<lifetimelimit>86400</lifetimelimit>
<read_timeout>10</read_timeout>
<compress_data>1</compress_data>
<compress_tags>1</compress_tags>
<compress_data>gzip</compress_data>
</backend_options>
</fpc>
Scheduled redis cache clearing cronjob as per this reference URL: http://inchoo.net/magento/using-redis-cache-backend-and-session-storage-in-magento/
-
Are you using any tool to monitor redis status/amount of memory used? give a try to: github.com/steverobbins/redis-status but if you want to get alerts or better stats try installing new rellic, appdinamics or another monitoring tool.MauroNigrele– MauroNigrele2015年12月29日 07:29:04 +00:00Commented Dec 29, 2015 at 7:29
-
Have you ever found the solution? I'm facing the exact same and going nuts here.ladle3000– ladle30002016年05月24日 11:17:55 +00:00Commented May 24, 2016 at 11:17
-
@ladle3000 Has anyone ever found a solution to this? I'm having the same problem on Magento 2.4.2-p1Allysin– Allysin2021年08月23日 00:26:47 +00:00Commented Aug 23, 2021 at 0:26
-
@Allysin I left for bigcommerce years agoladle3000– ladle30002021年08月24日 01:06:55 +00:00Commented Aug 24, 2021 at 1:06
3 Answers 3
For us this came down to being default Magento configuration cache.
Simply disabling the first cache (configuration cache) in backend is a quick fix/workaround.
We fixed with the following https://github.com/AmpersandHQ/magento-ce-ee-config-corruption-bug
-
Also we are using Magento 1.9.1 which is what the OP was using too. I think it might be a bug in this specific version.ladle3000– ladle30002016年07月05日 13:21:06 +00:00Commented Jul 5, 2016 at 13:21
-
The related patch SUPEE-4755 worked like a champ for us on Magento 1.9.2.4Scruffy Paws– Scruffy Paws2018年08月02日 20:26:38 +00:00Commented Aug 2, 2018 at 20:26
Did you have CSS styles merged? Possibly, unmerging CSS files should fix the issue (System-Confguration-Advanced-Developer-CSS Setting-Merge CSS files).
However, you will need HTTP/2 on the server side, use compact version of styles, or even setup static compression to keep the same performance.
Also to avoid this issue I scheduled below cronjobs, which is flushing Redis cache
Redis Cache clean up script
30 02 * * * /usr/local/bin/redis-cli -h localhost -p 6379 flushall
31 02 * * * /usr/local/bin/redis-cli -h localhost -p 6380 flushall
Still some point of time I am hitting with the issue.
-
2This is like taking painkillers for a headache from a brain tumor. Masks it for a couple hours.ladle3000– ladle30002016年10月10日 14:31:59 +00:00Commented Oct 10, 2016 at 14:31
Explore related questions
See similar questions with these tags.