When you try to clean your “Database cache” (dbcache folder) get this error ?
500 Internal Server Error
Then, this “hack” will solve the “500 Internal Server Error” when you try to clean cache and will solve another issue with “Garbage collection”. The problem occurs mainly at sites with high traffic, tens of thousands of visits per day. If the execution time of a php scrip is too small (under 60s), plugin will never finish the “Garbage collection” job and the number of files and folders will grow day by day.
You try to delete from ssh?
When you are trying to delete too many files in a directory at the same time, it seems “rm” has limits (kernel limitation on the size of the parameters of the command) and you’ll see an error like
/bin/rm Argument list too long.
One solution to remove all folders from linux:
find /full-path/wp-content/w3tc/dbcache/ -name '*.ext' -print0 | xargs -0 rm -f
Will be impossible to make a full-backup at all because any script execution for full-backup will be blocked after a period of time, usually between 60 seconds and 5 minutes.
One solution is to set “Garbage collection interval” very low, maybe 60s .. or 10 seconds
!
Anyway, here is the plugin with the necessary changes to solve the problem:
- Download Local : w3-total-cache.0.8.5.2_Solve_Cache_Clean.zip
- Mirror 1 : w3-total-cache.0.8.5.2_Solve_Cache_Clean.zip
- Mirror 2 : w3-total-cache.0.8.5.2_Solve_Cache_Clean.zip




Thanks for your plugin, it works fine on my site.
B.T.W, Once you got the 500 internal server error, just remove the lines of codes about w3 cache in .htaccess, you site will be back!