2009-02-26 13:01:21     Boa CGI process dies when requeset takes a long time

Document created by Aaronwu Employee on Aug 14, 2013
Version 1Show Document
  • View in full screen mode

2009-02-26 13:01:21     Boa CGI process dies when requeset takes a long time

Ben Burleson (UNITED STATES)

Message: 70025   

 

I'm using Boa to provide an interface to a motor mechanism and when the user wants to perform a motor move that takes a long time (>~60sec?) the CGI process dies - motor movement stops and the HTML response is cut off.

 

I'm wondering what is causing this and is there a setting to allow a CGI process longer time to complete?

 

Thanks,

 

Ben

 

 

QuoteReplyEditDelete

 

 

2009-02-26 13:13:34     Re: Boa CGI process dies when requeset takes a long time

Mike Frysinger (UNITED STATES)

Message: 70027   

 

are you sure it's a timeout issue, or is boa sucking up memory until it crashes/dies ?

QuoteReplyEditDelete

 

 

2009-02-26 14:17:55     Re: Boa CGI process dies when requeset takes a long time

Ben Burleson (UNITED STATES)

Message: 70031   

 

Boa is still alive because I can refresh the page and issue the command again.  It's the CGI process that is started that dies unexpectedly.  Now that I write that, I realize maybe it has nothing to do with boa!

 

I'm still curious if boa kills a CGI process if it is taking too long to finish.

 

I'll try a test where the CGI just does a simple sleep and then writes some HTML response to see if it is boa timing out or more likely a problem in my CGI.

QuoteReplyEditDelete

 

 

2009-02-26 14:24:38     Re: Boa CGI process dies when requeset takes a long time

Mike Frysinger (UNITED STATES)

Message: 70032   

 

and there's nothing in `dmesg` to indicate that the kernel killed your cgi ?

 

did you try enabling ErrorLog and/or CGILog and/or VerboseCGILogs in your boa.conf to see what boa is doing ?

QuoteReplyEditDelete

 

 

2009-02-27 15:55:14     Re: Boa CGI process dies when requeset takes a long time

Ben Burleson (UNITED STATES)

Message: 70114   

 

Here is what is printed in boa-error.log:

 

172.16.4.119 - - [27/Feb/2009:19:58:31 +0000] request "POST /cgi-bin/focus HTTP/1.1" ("./focus"): connection timed out

[27/Feb/2009:19:58:31 +0000] reaping child 6668: status 13

 

 

So it is boa that's not happy with the CGI taking too long.

 

I have confirmed that this message appears just over 60 seconds in.  At first I thought this was tied to KeepAliveTimeout in boa.conf, so I doubled that to 120, but that did not change the behavior.  Is there something else to configure to tell boa to allow CGI more time to complete?

QuoteReplyEditDelete

 

 

2009-02-27 16:10:26     Re: Boa CGI process dies when requeset takes a long time

Mike Frysinger (UNITED STATES)

Message: 70115   

 

reading the source indicates that keepalivetimeout should do part of it, but the other is hardcoded

 

i'd modify src/defines.h in the boa source and increase REQUEST_TIMEOUT for your needs

QuoteReplyEditDelete

 

 

2009-02-27 16:49:58     Re: Boa CGI process dies when requeset takes a long time

Ben Burleson (UNITED STATES)

Message: 70116   

 

Yep, I was doing the exact same thing you were, and was just about to post that.

 

Increasing REQUEST_TIMEOUT solved my problem.

 

Thanks Mike.

Attachments

    Outcomes