2

My Craft CMS 3.7.38 is creating over 250.000 almost identical cache files inside the /storage/runtime/cache/-folder. Because the website isn't even a frequently used big platform, I have no idea why the framework is flooding the cache in such a way, resulting in the website crashing because the hoster limited the number of files to a reasonable amount.

I already tried to reduce the max cache time, I disabled all plugins to be sure that it's the framework itself, I am not using any {% cache %} tags myself in the templates and it seems to be connected to using matrix fields. Currently, I can only flush the "data cache" once a day to prevent the website from crashing.

Almost all cache files look like this:

a:2:{i:0;a:1:{i:0;a:0:{}}i:1;O:37:"craft\cache\ElementQueryTagDependency":3:{s:4:"tags";a:3:{i:0;s:7:"element";i:1;s:29:"element::craft\elements\Entry";i:2;s:32:"element::craft\elements\Entry::*";}s:4:"data";a:3:{s:40:"CraftCMSce35088bdfe0816226cd17fd051a1234";s:21:"0.45746100 1651155155";s:40:"CraftCMS2743a789e8993267a348eee1ee7e8742";s:21:"0.45746100 1651155155";s:40:"CraftCMS0c445ad43e1ed6e749c63233356asd57";s:21:"0.54989000 1651155155";}s:8:"reusable";b:0;}}

Thank you for any kind of hint.

1 Answer 1

4

I experienced a similar issue, and tracked it down to a web spider crawling the Solspace Calendar plugin for Craft. There are no bounds on the calendar, and so the bot was hitting pages like /calendar/day/2033/07/09.

I guess Craft sees all those pages as unique because of the unique URL, and creates cached files for each one. My temporary fix was to just ban the bot. But I think the permanent solution will be to prevent the "Next" and "Previous" buttons from appearing on the calendar pages when they hit a certain limit.

Not sure if this helps with your specific issue, but thought it might help someone else when they run into something similar.

I would suggest searching your web access logs for a bot that might be caught up in your link structure.

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.