Re: mod_scgi on Apache2

Neil Schemenauer <[email protected]>
Newsgroups gmane.comp.web.quixote.user
Message-ID <[email protected]>
On Tue, Aug 02, 2005 at 02:08:47AM +0800, Bo Yang wrote:
> Neil, how do scgi_server deal with time-out?
> say, one child process after another get stuck somewhere and never  
> return their requests?

The Python code in the scgi package is designed to not need a
timeout.  It is the application's responsibility to not get stuck
itself.

> is there a way to set a timeout somewhere to kill them off and spawn  
> new replacements?

If the application process dies then the scgi master process will
respawn a new one.  You could use signal.alarm().  Personally, I
would try to figure out why the application is getting permanently
suck.  That sounds like a bug, maybe in the MySQL extension.

You might try giving one of your suck processes a SIGINT signal.
That may produce a traceback from Python that would help in
determining where the problem lies.

> (I'm experimenting with lighttpd. so far my problem persists, so i  
> don't think it's mod_scgi/apache2 related)

Yes, it seems unlikely that mod_scgi is responsible for the problem.

  Neil
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.