On 24/12/10 03:38, Seok Jiwoo wrote:
Dear all,
I have several problems of squid-cache server.
Firstly, the symptoms are
o at first when I installed squid, it worked well as cache-server.
o but as times passed, web browser didn't open.
- there're some kinds of error messages.
- one is 'time out'
- the other is 'your proxy have some problems.'
- and so on..
o I had had veeeery loooooong access time.(when I checked 'access.log' file)
o eventually, squid server dosen't work when I give the command, '
squid -X or -D or start'.
I already did
o use [squid -k rotate] and rotated log-files.
o it didn't work.
My squid-cache is squid-3.0.STABLE25-1.el5 and the OS is the RedHat 5-64bit.
I installed squid and set up 'squid.conf' file as below.
o visible_hostname localhost
o http_port 3128
o cache_dir ufs /web-cache/cache1 100000 16 256
cache_dir ufs /web-cache/cache2 100000 16 256
cache_dir ufs /web-cache/cache3 100000 16 256
300GB of cache. I hope you have well over 4GB of RAM on that box
dedicated to Squid. ~3GB of it will be sucked up by the disk index.
Add cache_mem on top of that, add another 10% of cache_mem for the index
of that space, and then add about 64KB for you maximum peak client count.
o access_log /log/squid/access.log squid
o cache_log /log/squid/cache.log
o store_log /log/squid/store.log
You can drop store log under normal use, its not that useful unless
debugging the storage:
cache_store_log none
o logfile_rotate 9 ( and /etc/logrotate.d/squid file has been reviesed.)
By "reviesed" I hope you mean erased. logrotate.d and squid internal log
rotation do not work well together. Pick one.
o shutdown_lifetime 1 seconds
Large cache + extremely short shutdown period = cache corruption.
Squid will handle it by doing a full scan of the entire disk space on
startup to reload all the meta data from scratch. This is a period of
slow proxy speed while it dedicates CPU cycles for the scan.
When your 300GB of cache is full this will likely take somewhere
between 4 and 10 hours to complete.
Things to check:
* memory usage is not swapping. This will cause squid to significantly
drop in speed.
* check for crashes or other problems in cache.log. Note the 4-10 hour
recovery time loading the index after each crash will be a slow period.
On top of that 3.0 is obsolete for nrearly a year now. There are a
number of fatal bugs and leaks which are resolved in later releases.
Some newer packages can be found linked from
http://wiki.squid-cache.org/KnowledgeBase/RedHat. These still have some
of the leaks only recently fixed but should be better than 3.0 on bugs.
Amos
--
Please be using
Current Stable Squid 2.7.STABLE9 or 3.1.9
Beta testers wanted for 3.2.0.3