I'm hosting a Django server on a virtual machine with Apache, and running into some odd timeouts. Specifically, every so often, the server will drop, with logs only displaying Timeout when reading response headers from daemon process 'XXX-0.0.86': /mypath/myproject/wsgi.py
.
I'm certain that this is a server-side / configuration issue, as the exact same (quick) GET request will run properly multiple runs before resulting in a timeout in an unpredictable manner. What's more, although I've tried most all the solutions outlined in a similar issue here, (i.e. adding %{GLOBAL}
, changing the timeout in httpd.conf
, comparing configs, restarting) there's still been no luck. Yet bafflingly, running the project locally or on the VM with python manage.py ...
does not throw any errors.
My intern skills are at a loss and I thought I'd turn to the community for help. Attached is the configuration file for the Apache Django daemon. Any tips?
Listen 8075
<Virtualhost *:8075>
ErrorLog /var/log/httpd/XXX.log
LoadModule wsgi_module /var/www/cgi-bin/python36_virtenv/lib/python3.6/site-packages/mod_wsgi/server/mod_wsgi-py36.cpython-36m-x86_64-linux-gnu.so
Alias /static /var/www/cgi-bin/XXX-0.0.86/XXX/static
<Directory /var/www/cgi-bin/XXX-0.0.86/XXX/static>
Require all granted
</Directory>
<Directory /var/www/cgi-bin/XXX-0.0.86/XXX/myproject>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
WSGIDaemonProcess XXX-0.0.86 python-path=/var/www/cgi-bin/XXX-0.0.86/XXX:/var/www/cgi-bin/python36_virtenv/lib/python3.6/site-packages/
WSGIProcessGroup XXX-0.0.86
WSGIScriptAlias / /var/www/cgi-bin/XXX-0.0.86/XXX/myproject/wsgi.py
WSGIPassAuthorization On
WSGIApplicationGroup %{GLOBAL}
Alias /stdouts /home/redacted/stdoutbuffer/
<Directory /home/redacted/stdoutbuffer/>
Require all granted
Options +Indexes
</Directory>
Alias /artifacts /mnt/results/
<Directory /mnt/results/>
Require all granted
Options +Indexes
</Directory>
</Virtualhost>