May 29, 2008
SQUID
No Comments
Amos Jeffries
Tue, 01 Apr 2008 21:18:49 -0700
Marcio Augusto Stocco wrote:
Testing Squid/SquidGuard with thousands of users, the cache.log shows
the following messages:
2008/04/01 15:19:16| WARNING: All url_rewriter processes are busy.
2008/04/01 15:19:16| WARNING: up to 2730 pending requests queued
2008/04/01 15:19:16| Consider increasing the number of url_rewriter
processes to at least 3552 in your config file.
2008/04/01 15:19:34| WARNING! Your cache is running out of filedescriptors
2008/04/01 15:19:50| WARNING! Your cache is running out of filedescriptors
2008/04/01 15:19:56| comm_open: socket failure: (24) Too many open files
2008/04/01 15:19:56| comm_open: socket failure: (24) Too many open files
2008/04/01 15:19:56| comm_open: socket failure: (24) Too many open files
The server is a HP DL360G5 (2x Xeon Dual 1.6 GHz, RAM 8 GB, HP Smart
Array - RAID 1).
Is there any way to increase SQUID_MAXFD from 8192 to 65536, so I can
try using the sugested number of url_rewriter processes?
Squid 2.6: --with-maxfd=65536
Squid 3.x: --with-filedescriptors=65536
Be sure your OS can handle a single process with that many FD though. Using these options overrides the automatic build detections AFAIK.
You can also use ulimit while compiling (I don't know the details).
With SQUID_MAXFD=8192 I got lots of "comm_open: socket failure: (24)
Too many open files" if url_rewriter is set higher than 200 (roughly).
Thanks for any help,
Marcio.
For our info, you say you are handling thousands of users;
and what release of squid is it?
what request/sec load is your squid maxing out at?
Amos
May 29, 2008
SQUID
No Comments
Awalnya seperti biasa, nemu error semacem ini
2008/05/25 22:44:49| storeDiskdSend: msgsnd: (35) Resource temporarily unavailable
2008/05/25 22:44:49| storeDiskdSend OPEN: (35) Resource temporarily unavailable
2008/05/25 22:44:51| storeDiskdSend: msgsnd: (35) Resource temporarily unavailable
2008/05/25 22:44:51| storeDiskdSend OPEN: (35) Resource temporarily unavailable
2008/05/25 23:45:38| sslReadClient: FD 60: read failure: (60) Operation timed out
di cache.log dan terkadang si SQUID suka mati tiba2 servicenya, cari-cari di forum dan milis squid, katanya harus ada optimize kernel untuk cache_dir yang menggunakan option diskd, dan memang kalo digunakan ufs sih ndak masalah.
Berikut parameter yang harus di tambah di kernelnya
FreeBSD
setting in: in /etc/sysctl.conf
kern.maxfilesperproc=8192
setting in the kernel config file (larger values may be needed for very busy caches):
options MSGMNB=8192 # max # of bytes in a queue
options MSGMNI=40 # number of message queue identifiers
options MSGSEG=512 # number of message segments per queue
options MSGSSZ=64 # size of a message segment
options MSGTQL=2048 # max messages in systemoptions SHMSEG=16
options SHMMNI=32
options SHMMAX=2097152
options SHMALL=4096
options MAXFILES=16384
Linux
Stefan Köpsell reports that if you compile sysctl support into your kernel, then you can change the following values:
- kernel.msgmnb
- kernel.msgmni
- kernel.msgmax
Winfried Truemper reports: The default values should be large enough for most common cases. You can modify the message queue configuration by writing to these files:
- /proc/sys/kernel/msgmax
- /proc/sys/kernel/msgmnb
- /proc/sys/kernel/msgmni
selesai sudah deh, tinggal compile kernel dan restart cache_dir, Alhamdullilah cara ini sementara ampuh menghandle issue ini, ntar itu bugs ato apa yg jelas so far so good setelah melakukan optimize kernel
Ref: http://squid.biz.net.id/faq
Thanks,
~Angky R~