2

I have a Django 1.11.17 application deployed on Apache 2 and WSGI, Python 2.7.

Apache shows an error "Truncated or oversized response headers received from daemon process"

I have checked the solution given in WSGI : Truncated or oversized response headers received from daemon process

and WSGIApplicationGroup %{GLOBAL} is in the virtual host file. However the error persists.

Django shell works. Django check returns no errors. Django runserver works. Django log shows no errors.

How can I see the exact error that is making WSGI not working?

  • Can you switch to nginx? – Michael Hampton Jun 15 '19 at 3:09
  • Yes, I could switch to nginx, but I would like to know how to fix it – Jose Luis de la Rosa Jun 15 '19 at 18:46
4

There is a debugging mode that you can use provided by mod_wsgi. You can find the documentation here:
https://modwsgi.readthedocs.io/en/develop/user-guides/debugging-techniques.html

However, we found that we were using third-party packages such as numpy or psycopg2-binary that were causing issues. In our case, we were using psycopg2-binary which is a big no no for production apps. We removed it and followed their documentation on pip installation and everything worked. We also added WSGIApplicationGroup %{GLOBAL} to our apache2 server settings.

You may find the psycopg documentation at http://initd.org/psycopg/docs/install.html#prerequisites

Hope this helps.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.