• Resolved SAT

    (@stronganchortech)


    I have WPO installed on multiple sites. Since approximately Dec. 1, I’ve noticed the free space on my server steadily disappearing. After it got completely filled up, I noticed that the /wp-content/cache/wpo-minify/ folder was the culprit. On three different sites, this folder was between 8GB and 16GB in size. Why is the minify cache taking up so much space?

Viewing 15 replies - 1 through 15 (of 18 total)
  • I’m experiencing the same issue even though I’m using this snippet:

    add_filter( 'wp_optimize_minify_cache_expiry_time', function( $original_value ) {
    	return time() - 86400 * 3;
    } );

    @stronganchortech Please try to use the snippet provided by @leandroprz and check the if the minify cache files size reduces:

    add_filter( 'wp_optimize_minify_cache_expiry_time', function( $original_value ) {
    	return time() - 86400 * 3;
    } );

    The snippet won’t solve his issue. I’m using it and I still have the issue OP is experiencing.

    Thread Starter SAT

    (@stronganchortech)

    @bornforphp Is this snippet only just changing the expiry from 30 days to 3 days? How much space do you expect a days’ worth of cache to take up? For a ~300-400mb WordPress installation, the minify cache was taking up more than 10 GB.

    Even if it was caching an entire copy of the website once per day (which it shouldn’t be doing, right?), it still shouldn’t be that big even if it was keeping 30 copies of it.

    Maybe I’m missing something, but isn’t this folder just supposed to have minified (i.e. smaller) versions of JS and CSS files? That should be pretty small, right?

    On a different site on the same server, for example, the wpo-minify folder takes up only 3mb. And that’s for a website that is about the same size (300-400mb WordPress installation). Another site, a WP installation just over 400mb, has a wp-minify cache just under 200mb.

    I did notice a pattern that it seems like the issue is much worse for older sites with a lot of posts in them. The sites that have been newly created in the last few years don’t seem to have an issue with the wpo-minify folder.

    I don’t mind trying the code snippet to see if it helps, but I’d like to understand a little more of what’s going on.

    Thread Starter SAT

    (@stronganchortech)

    To make it clearer what I’m talking about, I’d like to give specifics of my server.

    I have a VPS with 90GB of space (about 84GB usable for websites). I have 28 websites on the server, and they were consistently using about 60 GB of space before Dec. 1. Then, from Dec. 1 to Dec. 5, the amount of disk space I was using gradually shot up to 84GB, at which point it maxed out and sites started going down.

    I literally deleted the wpo-minify folder on only 4 sites and disabled the WPO plugin on those sites, and my total “used disk space” went from 84GB to 42GB. So the WPO minify cache for just 4 sites was taking up half of the disk space on the whole server (and presumably would have kept going if I had more space available).

    As I said before, all 4 of the sites that had major issues are older WP sites that have been recently updated / revamped, and the sites with more total blog posts had a more serious issue with the minify cache.

    @stronganchortech May be you have plugns and theme’s that uses a lot of JS and CSS on those 4 sites so WP-Optimize was caching JS and CSS and consuming more space.

    If you use the snippet

    add_filter( 'wp_optimize_minify_cache_expiry_time', function( $original_value ) {
    	return time() - 86400 * 3;
    } );

    It will delete the minify cache folder after 3 days, so you wan’t have to manually delete the files.

    I have the same problem.
    I found that font urls in css files are being re-written with a timestamp – at least in my case, e.g. from “fonts/dashicons.eot?99ac726223c749443b642ce33df8b800” to “fonts/dashicons.eot#1638839013”. This seems to cause WPO to re-build the cache files every other time.
    Does WPO re-write the font url?

    @schaum194 Please use the following snippet to automatically delete the minify files after 3 days:

    add_filter( 'wp_optimize_minify_cache_expiry_time', function( $original_value ) {
    	return time() - 86400 * 3;
    } );

    @bornforphp Thank you for that workaround! I had already switched off minification completely. To be honest, I would prefer a more generic solution.
    I don’t know, if it is a WPO-related problem at all, but I will watch out for your next update and give it another try then.

    @schaum194 Sure thing, Lets wait for next update.

    @schaum194
    For me downgrading to v3.1.12 fixed the issue. Instead of having about 5GB of minified files now I got about 56MB in the last 48hs.

    Thread Starter SAT

    (@stronganchortech)

    @leandroprz – that makes sense to me because v3.2.1 just came out on Nov. 29, and it was around that time that the disk space started getting filled up on my server. And looking at the release notes, it does seem like there were significant changes to the minify cache in v3.2.1.

    @stronganchortech I’ll chekc this with our development team to further troubleshoot the issue with v3.2.1

    Hi. Has this issue been resolved?

    Hi. No, @leandroprz , definitely not with v3.2.2.

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Minify cache going crazy and taking up 16+ GB disk space’ is closed to new replies.