logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Running htcacheclean for the first time
Author
chu_bun



Joined: 28 Mar 2015
Posts: 4
Location: USA, Houston

PostPosted: Sun 29 Mar '15 20:17    Post subject: Running htcacheclean for the first time Reply with quote

We run httpd-2.2.3 on CentOS 5.8 with caching enable. The server has been running for 4 years, but htcacheclean has never been run. The cache folder is about 10GB now (a "du" on the folder takes a very long time to complete). Should we expect any problem when running htcacheclean for a first time such as server slowing or freezing, ...
Furthermore, in case of freezing, if we disable caching and restart the server, do we expect any problems?
We did a few test on our test servers, and everything was fine, but our test servers do not have a large cache folder.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Mon 30 Mar '15 10:53    Post subject: Reply with quote

htcacheclean just deletes the caches files. So there shouldn't be any problems. You also can limit the size of the cache see http://httpd.apache.org/docs/2.2/programs/htcacheclean.html
Back to top
chu_bun



Joined: 28 Mar 2015
Posts: 4
Location: USA, Houston

PostPosted: Mon 30 Mar '15 17:59    Post subject: Reply with quote

The clean up may take some time to complete while the server is using the cache. Is it possible that some conflicts or slowing down can happen?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Wed 01 Apr '15 17:47    Post subject: Reply with quote

I'm not aware about conflicts. Slow down. Hm, depends on your hardrive and CPU performance.
Back to top
chu_bun



Joined: 28 Mar 2015
Posts: 4
Location: USA, Houston

PostPosted: Thu 02 Apr '15 18:35    Post subject: Reply with quote

Thank you for your responses.

I read from the onlamp.com that it's perfectly safe to delete the cache files with something like
rm -rf /var/www/cache/*

Running htcacheclean cannot be worse than that! Anyway I start the process, and it's still running after 1 hour. Hopefully, everything will be OK.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Thu 02 Apr '15 20:57    Post subject: Reply with quote

chu_bun wrote:

I read from the onlamp.com that it's perfectly safe to delete the cache files with something like
rm -rf /var/www/cache/*


As I told you Wink
James Blond wrote:
htcacheclean just deletes the caches files.


Only difference is that htcacheclean checks the age of each file, that is why it takes longer.
Back to top
chu_bun



Joined: 28 Mar 2015
Posts: 4
Location: USA, Houston

PostPosted: Thu 02 Apr '15 23:09    Post subject: Reply with quote

I ran the command with -v (verbose) and it has been running for 3 hours without showing any messages. "top" shows the process consumes Mem and CPU. What the heck is it doing? If the server goes down, so do I. And this really makes me nervous!
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Sat 04 Apr '15 22:25    Post subject: Reply with quote

How was it?
Back to top


Reply to topic   Topic: Running htcacheclean for the first time View previous topic :: View next topic
Post new topic   Forum Index -> Apache