On 2014-08-02, Florian Obser <[email protected]> wrote:
> On Sat, Aug 02, 2014 at 12:11:18PM +0200, S?bastien Marie wrote:
>> Hi,
>> 
>> I do some tests with a cgi program that go in infinite loop.
>> 
>> In order to test it with nginx (-current GENERIC.MP#304), I started
>> slowcgi to run the cgi program (and configured ngnix).
>> 
>> The configuration is ok: the cgi program reply as expected in normal
>> cases.
>> 
>> But when it go in infinite loop: the connection timeout after 1
>> minute. ngnix report "504 Gateway Time-out" and the connection is
>> closed.
>> 
>> But, the cgi program is still running (in infinite loop at max CPU).
>> 
>> Is it an expected behaviour or not ? It seems odd to me.
>> Does slowcgi implements some timeout ?
>
> Yes, 120 seconds. After that it considers the cgi script to be dead
> and cleans up the connection to nginx.
>
> However it does not kill the cgi script. I talked to some people when
> I implemented that and we decided it would be best to not kill the cgi
> script as it probably cannot handle that. I.e. leaving half written
> files behind or some other crap. So it comes down to fixing the cgi
> script to not get into an infinit loop ;)

Hmm, that may be a useful feature for hosting environments..

Reply via email to