• Poul-Henning Kamp's avatar
    The acceptor already has a back-off feature for when we run out of · d44838bf
    Poul-Henning Kamp authored
    filedescriptors, generalize that concept and use it for all cases
    where we cannot accept and/or serve the connection:  (Lack of sessions,
    lack of workerthreads).
    
    This is controlled by three paramters:
    
    Everytime we run into trouble, we increase the sleep-time by:
    	acceptor_sleep_incr (0.001 s)
    
    But we never let it get above
    	acceptor_sleep_max  (0.050 s)
    
    Once we manage to accept and schedule a connection, we multiply
    the sleep-time by:
    	acceptor_sleep_decay (0.9)
    
    The default numbers are more or less picked out of thin air.
    
    Two new stats counters help us keep track of this:
    	accept_fail
    		where accept(2) returns error.  This can be out of
    		file-descriptors, but also clients which closed while
    		they were stuck in the accept-queue.  Under normal
    		operation, a minor trickle is probably to be expected.
    
    	client_drop
    		New connection dropped, because we could not get a
    		session for it, or because the workerthreads were
    		too busy.
    
    	client_drop_late
    		An previously served connection was dropped for the
    		same reasons.
    
    As always, feedback welcome.
    
    
    
    
    git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@4497 d4fa192b-c00b-0410-8231-f00ffab90ce4
    d44838bf
Name
Last commit
Last update
..
compat Loading commit data...
Makefile.am Loading commit data...
binary_heap.h Loading commit data...
cli.h Loading commit data...
cli_common.h Loading commit data...
cli_priv.h Loading commit data...
cli_serve.h Loading commit data...
flopen.h Loading commit data...
http_headers.h Loading commit data...
http_response.h Loading commit data...
libvarnish.h Loading commit data...
libvcl.h Loading commit data...
miniobj.h Loading commit data...
persistent.h Loading commit data...
purge_vars.h Loading commit data...
shmlog.h Loading commit data...
shmlog_tags.h Loading commit data...
stat_field.h Loading commit data...
stats.h Loading commit data...
svnid.h Loading commit data...
varnishapi.h Loading commit data...
vbm.h Loading commit data...
vcl.h Loading commit data...
vcl_returns.h Loading commit data...
vct.h Loading commit data...
vev.h Loading commit data...
vlu.h Loading commit data...
vpf.h Loading commit data...
vqueue.h Loading commit data...
vre.h Loading commit data...
vrt.h Loading commit data...
vrt_obj.h Loading commit data...
vsb.h Loading commit data...
vsha256.h Loading commit data...
vss.h Loading commit data...