Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Apache Garbage Collection Help!! CacheGcInterval

Status
Not open for further replies.

eallen

MIS
Feb 21, 2002
2
US
I don't think garbage collection is happening. I am running Apache 1.3 on Suse Linux 6.3 Here are the lines from my httpd.conf file...

CacheRoot "/web/httpdcache"
CacheSize 50000
CacheGcInterval 4
CacheMaxExpire 24
CacheLastModified Factor 0.1
CacheDefaultExpire 1

My cache size is currently 216 MB and was once over 2GB (until it filled up the disk and I had to delete it) which makes me think that the Garbage collector is not working. Does anyone have any additional info on this or mabye a way to test to see if it is working?

Any help is appreicated!!

Thanks!!
 
Hi,

Doesn't seem right - the directives appear correct but if you have had more than 50000kb (approx 48mb) in the cache for more than 4 hours (since last garbage collection) then its not working. CacheSize has no meaning unless CacheGcInterval is also set but, if it is, it should mean that the cache is trimmed down to the CacheSize figure every garbage collection run.

If it wasn't working at all I'd suspect that mod_proxy was not active in httpd.conf but it must be if files are being cached.

There was at least one bug with this in the win32 version but you don't seem to be running that based on your CacheRoot.

The only things I can really suggest are tweaking the interval value to see if it makes any difference and/or upgrading to a newer version if you are not on the latest already.

For anyone else interested see -->
Regards
 
Ok, I guess it *is* working. I read the same article about the problems with the Win version of Apache but I am running Linux so that doesn't apply. The only thing I did different this time around was move the CacheRoot to a bigger file system. I also verified that permissions were set up correclty and they were. Strange problem but I am going to change the interval to 1hr and keep a close eye on it. (my cache grows at aprox. 1 meg every 30-45 seconds!)

Also I know the mod_proxy is working because I have over 200 users proxying at all times.

Thanks for your help.

PS does anyone know what process spawns the Garbage clean-up?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top