]> git.ipfire.org Git - thirdparty/squid.git/commit - src/cf.data.pre
Make Squid death due to overloaded helpers optional.
authorEduard Bagdasaryan <eduard.bagdasaryan@measurement-factory.com>
Sat, 13 Aug 2016 00:43:50 +0000 (12:43 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Sat, 13 Aug 2016 00:43:50 +0000 (12:43 +1200)
commit6082a0e2e301e4d4a731fe82948eb196585499b2
tree81c630760dc1238c509c9384064266a5b4c9cf15
parentd430902626c658a0075693dc11004f862e4a7451
Make Squid death due to overloaded helpers optional.

Added on-persistent-overload=action option to helpers. Helper overload
is defined as running with an overflowing queue. Persistent helper
overload is [still] defined as being overloaded for more than 3 minutes.

The default behavior is unchanged(*) -- Squid worker dies with a fatal
error at the attempt to submit a new request to a persistenly overloaded
helper. This default behavior can also be configured explicitly using
on-persistent-overload=die.

With on-persistent-overload=ERR, when dealing with a persistently
overloaded helper, Squid immediately skips the helper request and sends
an ERR response to the caller. Squid informs the admin when it starts
and when it stops skipping helper requests due to persistent overload.

The code had conflicting notions of an "overloaded helper". The external
ACL helper, the URL rewriter, and the store ID code used queueFull() to
test whether the new request would overflow the queue (and, hence,
overload the helper), but queueFull() itself did not check whether the
queue was full! It checked whether the queue was already overflowing.
This confusion resulted in that code scheduling one extra helper request
before enabling bypass. The code and its documentation are now more
consistent (and better match the "overload" terminology used by the new
configuration option, which also feels better than calling the helper
"full").

(*) Resolving the above confusion resulted in minor (one request)
differences in the number of helper requests queued by Squid for
external ACL, URL rewriting, and store ID helpers, with the adjusted
behavior [better] matching the documentation.
doc/release-notes/release-4.sgml
src/cf.data.pre
src/external_acl.cc
src/helper.cc
src/helper.h
src/helper/ChildConfig.cc
src/helper/ChildConfig.h
src/redirect.cc