Re: [PATCH] immortal helpers

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Sat, 20 Feb 2010 22:30:31 +1300

Alex Rousskov wrote:
> On 02/19/2010 09:12 PM, Amos Jeffries wrote:
>> This patch adds an advanced option to the Squid helper controls which
>> overrides Squid dying when helpers crash.
>>
>> It has been found necessary in certain corner cases with PHP helpers
>> (which have system imposed limited lifetimes) where a proxy has
>> previously been under some load and helpers started then are timed out
>> later under low load as a bunch. Squid may die and restart.
>>
>> If the proxy has been started under existing high load conditions (such
>> as a backup coming online) this case may also occur shortly after
>> startup. Leading to a chain reaction of restarts until load drops below
>> number of helpers needed to trigger a death.
>>
>> These cases depend on external forces or helper design closing the
>> helpers outside Squid control.
>>
>>
>> There is one known issue with this option:
>>
>> If the helpers are really dying due to some fatal issue during their
>> startup the use of this option would result in Squid hanging while
>> infinitely re-starting helpers and doing no request processing.
>
> Missing squid.conf documentation update?
>
> I think "immortal" is a little strange choice for helpers that die all
> the time :-). How about "phoenix"? It is not an adjective but it fits:
>
>> phoenix
>>
>> * A phoenix is an imaginary bird which, according to ancient stories,
>> burns itself to ashes every five hundred years and is then born again.
>>
>> * If you describe someone or something as a phoenix, you mean that they
>> return again after seeming to disappear or be destroyed. N-SING literary
>
> Cheers,
>
> Alex.

The dynamic helpers are already phoenix. This is about making Squid
itself immortal to the flames as they regenerate.

I've left the doc out for now since I'm not sure I really want this to
be widely used until we can get rid of the fork bomb as Kinkie named it.

If anyone can think of a reliable way to detect broken helper crashes
while also permittig 100% of the helpers to exist at any given time
(real closure exit, not a crash). I'd really like to be able to do that
instead of all this close-per-time fudging.

Kinkie,
  the non-use of this option keeps things flowing with detection of
N/30sec being fatal to Squid and aborting a fork loop. It's not working
too well when N=1 and count closing is >1 though.

Amos

-- 
Please be using
   Current Stable Squid 2.7.STABLE8 or 3.0.STABLE24
   Current Beta Squid 3.1.0.16
Received on Sat Feb 20 2010 - 09:30:51 MST

This archive was generated by hypermail 2.2.0 : Sun Feb 21 2010 - 12:00:07 MST