Discussion:
[gevent] Debugging tips for intermittent WSGIServer crashes?
Todd Schiller
2018-04-09 19:22:49 UTC
Permalink
We're running Django on a gevent WSGIServer on Microsoft IIS on Azure's App
Service using the HttpPlatformHandler [1]. We're seeing some intermittent
crashes that don't appear to be correlated to usage or application errors
(they sometimes occur no one is using the application, except for the
automated availability test which is detecting the downtime)

Connections will first hang/time out and then we get a message, "The
specified CGI application encountered an error and the server terminated
the process.", and then some additional downtime while IIS is presumably
restarting the master Python process

Does anyone have any debugging tips for gevent (e.g., logging settings) to
help determine if the WSGIServer might be involved in the failures? We're
invoking the the server with:

WSGIServer(('0.0.0.0', int(os.environ["PORT"])),
application).serve_forever()

, so presumably the log and error_log should be getting passed though
sys.stderr to the stdoutLogFile we have configured for HttpPlatformHandler
[1]. However, we're not seeing any error information there (e.g., about
crashed workers, etc.). We are, however, seeing entries of the form
following, which I suspect are the WSGIServer access events:

127.0.0.1 - - [2018-04-05 20:17:16] "GET / HTTP/1.1" 200 1914 0.000000

We're running gevent 1.2.2, Django 1.11.10, on Python 3.6.4 x64

Thanks,
Todd

[1] https://technet.microsoft.com/en-us/library/mt125371.aspx
--
You received this message because you are subscribed to the Google Groups "gevent: coroutine-based Python network library" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gevent+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...