How long should it take for "Loading WSGI script" for a python app configured on an apache web server?

404 Views Asked by At

I am testing to see if I can serve a simple Python website on an Apache web server. I installed mod_wsgi, modified httpd.conf and etc/hosts file.

I am tailing the server error log, and I have been waiting for wsgi script to load. Below is the message

[Thu Dec 22 15:46:40 2016] [info] [client xxx.xxx.xx.xx] mod_wsgi (pid=5191, process='hello', application='myapp.com|'): Loading WSGI script '/var/www/hello/hello.wsgi'.

I am wondering how long I should be waiting at this message. Currently, when I navigate to the site through myapp.com, I get an ERR_EMPTY_RESPONSE message.

Thank you so much for all your help!

1

There are 1 best solutions below

0
On

There is no message which follows that to say it has finished loading.

What you are probably encountering is that you are using a C extension module in some Python package which doesn't work properly with Python sub interpreters. This can cause thread deadlocks or process crashes. Both of which may lead to an empty response.

Review the documentation for mod_wsgi which talks about the issue.

Then try the suggested workaround of forcing the use of the main Python interpreter context rather than a sub interpreter.