WSGI issue...

John Szakmeister john at szakmeister.net
Tue Mar 9 14:19:13 GMT 2010


On Mon, Mar 8, 2010 at 5:16 PM, John Szakmeister <john at szakmeister.net> wrote:
> On Mon, Mar 8, 2010 at 2:42 PM, John Szakmeister <john at szakmeister.net> wrote:
> [snip]
>> What looks like is happening is that the smart server fails s a
>> result, and it's falling back to just plain HTTP... which is horribly
>> slow, even on a LAN.  Any ideas?
>
> Looks like I may have been wrong on this part... it's still using the
> smart server, but dumping that ugly traceback to the logs. :-(

Here's the relevant data from the mod_wsgi documentation:
    In the interests of promoting portability of WSGI applications,
mod_wsgi restricts use of signal.signal() and will ensure that any
attempts to register signal handlers are ignored. A warning notice
will be output to the Apache error log indicating that this action has
been taken.

    If for some reason there is a need for a WSGI application to
register some special signal handler this behaviour can be turned off,
however an application should avoid the signals SIGTERM, SIGINT,
SIGHUP, SIGWINCH and SIGUSR1 as these are all used by Apache.


So it seems that we should avoid adding a handler for SIGWINCH when
bzr is launched as a WSGI application... but I'm not sure how you make
that distinction from osutils.  It seems like the Bazaar text client
should register this, rather than having osutils do it outright.

-John



More information about the bazaar mailing list