My Disk Space Keeps Filling Up! Why?

Hi guys,



Can you guys please help me diagnose what's going on here? My disk space where I'm hosting my site keeps filling up.



This is the warning I get: “The file system /dev/simfs, which is mounted at /, has reached critical status because it is 99.99% full”



About a week ago, my site started doing this, so I increase my disk space from 25Gig to 35 and days later it's full again and causing issues with me site functioning correctly. I haven't added any content/images so I don't know why this is happening.



I know I have a lot of images, but there seems to be something else going on. I think my site is somehow duplicating content and taking up space.



I'm currently using 4.3.1.



I'm not really a techie…so I'd appreciate your help in finding a solution.



Thank you in advance!

Had same problem, solution is either to disable block cache in config file or have a cron that clears cache

Thank you for that advice. I don't really understand how cron works or how to set one up to do that. I'm also not sure what changes to make in the config file. Sorry, I'm not to experienced this side of things. Would appreciate advice on how to do this?



Also, my disk space is totally full now, would you know where I delete some files that may of been created from this caching? The space is so full, I cannot even access my admin page right now. I need to delete something via ftp, about 10 gigs have been added in the last week…just not sure what.



Thank you!

config.local.php


'disable_block_cache' => false, // used to disable block cache make it true



I have a huge hdd and cs-cart manages to fill it with millions of tiny files. Hosting providers have INODE limit, that is amount of files that can be fitted in say 1GB of memory.



My solution may be not perfect as this way more CPU is consumed, alternatively you can manually clear cache few times a week, also there was addon that runs CRON commands, that is runs sheduled commands for example …index.php?cc&ctpl or similar

Disabing the cache will slow down your site



Read this

[quote name='joshin' timestamp='1434612746' post='219253']

Also, my disk space is totally full now, would you know where I delete some files that may of been created from this caching?

[/quote]



/var/cache/

Thank you all very much!



Wow, my cache was filled up with 19Gigs of data, which rendered my site inoperable.



I see all your advice on how to disable caching, but as one suggested, wouldn't this slow my site down? I already had speed issues, so I'd really like to allow some caching. Is there a way I can set limits on this? Please remember, I'm not a techie, so I'd appreciate help in writing a piece of code and letting me know where to place it.



Thank you!



(Btw, I'm currently making a copy of /var/cache and plan on deleting if from my site…I hope this is safe to do?)

Guys,



Can you post approximate number of products in your store. Also how many Currencies/Languages/UserGroups you have.

This definitely should be considered as a bug and we will investigate this issue.

Imac,



I certainly appreciate you guys looking to this…seems to be a very common problem.



I have approximately 8,000 items, 11 language packs and 3 currencies activated.





Darius, thank you for the link!

[quote name='joshin' timestamp='1434745087' post='219638']

Imac,



I certainly appreciate you guys looking to this…seems to be a very common problem.



I have approximately 8,000 items, 11 language packs and 3 currencies activated.





Darius, thank you for the link!

[/quote]



With such number of products and languages probably robots generate all possible pages and thus cache size grows too much.

We plan to add garbage collector in the next versions.

Would be nice if you can send the size of folders and subfolders in var/cache

Hi you could try to empty your cache folder via cron once a week or sooner during night hours



You only need this line



for Cpanel

rm -rf /home/mydomain/public_html/var/cache/



for Plesk

rm -rf /var/www/vhosts/mydomain.gr/httpdocs/var/cache/




its a nobrainer solution and works fine.



Fotis

If you do not know path to the website, please use the following command in the cron task:



wget "https://www.domain.com/your_admin.php?cc&ctpl"

Is that gonna work from cron with no logged in admin?

Of course you could always use EZ Admin Helper and simply set it up to clear your cache at whatever frequency you wan along with all the other things it can do for you.

This is what I have been using for years…

php /home/user/public_html/admin.php --cc >/dev/null 2>&1

I've added disallow to robots.txt for


Disallow: *dispatch=products.search*


Which seems to have eliminated the problem

[quote name='tbirnseth' timestamp='1435007660' post='219991']

Is that gonna work from cron with no logged in admin?

[/quote]



Sure

For those who still experience the problem with cache growing too much. Try to comment out this code:


Registry::registerCache(array('pfilters', $key), array(
'products',
'product_descriptions',
'product_features',
'product_filters',
'product_features_values',
'products_categories',
'categories',
'product_filter_descriptions',
'product_features_descriptions',
'product_feature_variant_descriptions',
'ult_objects_sharing' // FIXME: this should not be here
), Registry::cacheLevel('user'));




in app/functions/fn.catalog.php file.



This will disable cache for product filters.

Not 100% positive but adding



Disallow: /*?features_hash=

Disallow: dispatch=products.search



to robots.txt helped my case

[quote name='eComLabs' timestamp='1435051452' post='220044']

Sure

[/quote]

To me, that would be a bug if the cache is cleared when the admin is not authenticated. NOTHING on the admin side of the cart should happen other than a login prompt if $_SESSION['auth']['user_id'] is empty. That would be a security hole in my mind.