Support » Plugin: PageSpeed Ninja » 3,55 GB Cache Size

  • Hello!

    Today I got a message from a user of my page saying there are no uploads possible any more. So I checked what´s wrong and found out the limit for the webspace has been reached. When looking for the reason I saw the size of the cache folder is 3,55 GB. That´s a lot – I don´t have that much content I guess.

    Maybe there is a problem the files in the cache are not being deleted.
    Im running PageSpeed Ninja version 0.9.37 on a BuddyPress Community.

    Is there an option not to cache some pages by defining e.x. including ‘/members/’ in the URL not to be cached?

    Keep up the great work!

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author Denis Ryabov


    Most likely you have dynamically-generated embedded scripts or styles on your pages (so that every page has unique scripts/styles). Try to disable “Merge embedded scripts” and “Merge embedded styles” in Advanced settings of PageSpeed Ninja.

    Plugin Author Denis Ryabov


    As to extra tuning settings, we are going to include them into the next release PSN 0.10.

    Great! I´m looking forward to the new version!

    Wouldn´t it be a good idea having an automated check for old files? When I looked inside the caching folder by FTP I found some files that where older than a month. So an option “delete files older than X days” could help in this cases and ensure the server does not run out of harddisk memory.

    Plugin Author Denis Ryabov


    All old cache files are removed automatically, but note that by default Caching time-to-live is 15 minutes for the Safe preset, 1 day for Compact and Optimal presets, and 7 days for Ultra and Experimental presets. You can try to reduce this value in PageSpeed Ninja’s Advanced settings (see “Reduce server response time” section).

    This does not seem to work correctly. I´ve enabled caching at “Reduce server response time” and set “Caching time-to-live” to 1440 seconds. Cleared the cache to be sure. Now, three days later I had a look again and there are files in cache folder that where stored three days ago. I think none of the files should be older than 24 hours.

    Version 0.9.37

    Plugin Author Denis Ryabov


    Which of folders is not cleared properly: /s, /wp-content/plugins/psn-pagespeed-ninja/cache, or /wp-content/plugins/psn-pagespeed-ninja/ress/cache?

    I only checked the /s folder.
    Should I checke the others, too?

    Plugin Author Denis Ryabov


    Yes, check others as well, please.

    As to /s, where most of your files are located, in the /a itself, or in /s/loaded subdirectory?

    Also note that PageSpeed Ninja clears /s directory daily, and or the sake of good order it may keep files with age up ton twice of the “Caching time-to-live” value. As a result, if your TTL is 1440 (note this value is set in minutes, so 1440 is a day actually), files in /s may actually stay there for up to 3 days.

    Alright, checked the other folders, too.

    Today is the 18th, oldest files in the folders are:
    – /s (12th, 6 days old)
    – /wp-content/plugins/psn-pagespeed-ninja/cache (18th, only from today)
    – /wp-content/plugins/psn-pagespeed-ninja/ress/cache (12th, 6 days old)

    The /s folder has 601 MB now – and it gets bigger, because it is not deleted.

    Plugin Author Denis Ryabov


    PageSpeed Ninja’s cache cleaner keeps files in /s directory that are “referenced” by cached data (files in /wp-content/plugins/psn-pagespeed-ninja/ress/cache). So, it looks like the problem is in ress/cache directory, there should be no such old files.

    Do you have /wp-content/plugins/psn-pagespeed-ninja/ress/cache/filecachecleaner.stamp file, and if yes, what is its modification date?

    Could you list names of few old files in /wp-content/plugins/psn-pagespeed-ninja/ress/cache directory (i.e. in its subdirectories)?

    The filecachecleaner.stamp is from the same old date: 12th this month.
    It has a size of 0 KB – if this should be necessary to know.

    Plugin Author Denis Ryabov


    It may mean that PageSpeed Ninja’s daily cleaner (executed via WordPress cron) either is not executed at all, or stops somewhere inside of execution. Do you have error messages with mention of psn-pagespeed-ninja in your error_log file?

    Checked the error log of the webserver – everything is fine here. For monitoring WP Cron I´m using “Advanced Cron Manager”. I see the daily task “pagespeedninja_daily_event” there. But it does not seem to do anything. Executed it manually and checked the files again: Nothing changed, the oldest files are still from 12th.

    Maybe here is the problem – found this in the logs (about 1.000 entries only for today):

    [Wed Apr 10 14:49:43 2019] [warn] [client 79.201.x.x] PHP Warning: preg_match() expects parameter 1 to be string, array given in /home/www/doc/ on line 775, referer:

    Any idea why this causes?

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘3,55 GB Cache Size’ is closed to new replies.