worker threads maxing out

Jon jonsml at
Wed Dec 5 22:54:10 CET 2007


I've been battling this for several days now and need some help to
figure this out.

Machines stats:  Ubuntu 7.10 64-bit, 4 GB RAM, 60 GB available drive space

The issue I've been encountering is that every morning during peak
traffic hours the N worker threads will hit the max allowed then N
queued work requests hits the max and of course the server starts to
reject any new incoming requests.  My backend server will start to

This is what I have for the varnishd options "-a -f
/usr/local/varnish/etc/ -p send_timeout=30 -w

I've been changing the -w numbers around but it hasn't help.  When I
lowered the max to 200 it didn't cause my backend server to queue but
it was rejecting requests.

I've also set the ulimit -n to 65536 in the limits.conf file and in
the mornings varnishd will eat up 100% cpu and restarts over and over.
 Then I added the ulimit -n 65536 into the startup script that's when
it stopped restarting and started the problem I described above.
After I remove all the load from the Varnish server the N worker
threads is fixed at 1500.  During non-peak hours the N worker threads
is ~260.

During peak it serves out 40 - 80 Mbps of images, previously using
Squid and it's fine.



More information about the varnish-misc mailing list