]> git.ipfire.org Git - thirdparty/squid.git/commit
Run helpers on-demand
authorAmos Jeffries <squid3@treenet.co.nz>
Wed, 16 Dec 2009 03:46:59 +0000 (16:46 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Wed, 16 Dec 2009 03:46:59 +0000 (16:46 +1300)
commit48d54e4daa77f1b390c3d38c0346949703fcb481
tree3f061959621c2c4a323c13ae9606675d756bf976
parent3cf1e8b61b6279a9820bd118afb9d8af3c140441
Run helpers on-demand

For some config backwards compatibility the maximum is kept as a single
integer first parameter to the *children directives.

Default setting changes:

 Instead of starting N helpers on startup and each reconfigure this
 makes the default zero and the configured value a maximum cap.
 The default maximum is raised from 5 to 20 for all helpers except
 for dnsservers where the maximum is raised to the old documented
 maximum of 32.

Obsoleted settings:
 url_rewrite_concurrency
  - replaced by the concurrency=N option now available on all *_children
    directives (including auth_param X children).
    To avoid compile problems this directive had to be fully dropped.

 auth_param X concurrency N
  - as above. However the option was able to be retained, as deprecated
    for future removal as well.

Behavior changes:

Whenever a request needs to use a helper and there are none available
immediately Squid tests to see if its okay to start a new one. Then does so.

The "helpers dying too fast" warnings and Squid closing has been modified
Squid will now not care about dying helpers if there are more that
startup=N active. If the death causes less than startup=N to be running
and is hit twice in less than 30 seconds will cause the warning message
to be doisplayed and Squid to abort same as before.

NP: that with startup=0 (the new default) helpers dying before or after
their first use will not crash Squid. But may result in a loop of
hung/failed requests and WILL result in a great many helper-failed
warnings in cache.log.

If needed we can bump the startup default back to 1 to avoid all that.
Or add a special check to kill squid if helpers die during startup and
provide a clearer log message "Foo helper is dying before we can finish
starting it" etc.

TODO: the current patch has no way to dynamically decrease the number of
      helpers. Only a reconfigure or helper dying can do that.
29 files changed:
doc/release-notes/release-3.2.sgml
helpers/log_daemon/file/log_file_daemon.cc
src/HelperChildConfig.cc [new file with mode: 0644]
src/HelperChildConfig.h [new file with mode: 0644]
src/Makefile.am
src/adaptation/ecap/MessageRep.cc
src/auth/basic/auth_basic.cc
src/auth/basic/auth_basic.h
src/auth/digest/auth_digest.cc
src/auth/digest/auth_digest.h
src/auth/negotiate/auth_negotiate.cc
src/auth/negotiate/auth_negotiate.h
src/auth/ntlm/auth_ntlm.cc
src/auth/ntlm/auth_ntlm.h
src/cache_cf.cc
src/cf.data.depend
src/cf.data.pre
src/dns.cc
src/external_acl.cc
src/globals.h
src/helper.cc
src/helper.h
src/icmp/Makefile.am
src/main.cc
src/redirect.cc
src/structs.h
src/tests/stub_HelperChildConfig.cc [new file with mode: 0644]
src/tests/stub_helper.cc
src/tests/stub_tools.cc