Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Truncated or oversized response headers received from daemon process

I recently migrated a python django application from a debian system to a redhat enterprise distribution. The application is hosted using httpd, mod_wsgi and running in a venv in an daemon process. On large requests I now get following error message in the log file:

"Truncated or oversized response headers received from daemon process" 

I have never experienced anything like this and Google is not the key here as well. I checked configuration of apache, but no config is related to response headers in there.

My httpd.conf configuration looks like this ( pretty standard):

WSGIPassAuthorization On
WSGIScriptAlias / /var/www/myapp/wsgi.py
WSGIDaemonProcess my.name python-path=/path/to/myapp/:/path/to/venv/lib/python2.7/site-packages display-name=%{GROUP}
WSGIProcessGroup my.name

Does any Guru have a hint in which direction I should look?

like image 280
kartopete Avatar asked Jul 18 '14 15:07

kartopete


2 Answers

We recently ran into this issue, and after days of vigorous ugoogleizing and massive headache, we discovered that we were using psycopg2-binary as our database connector dependency (I know, newbs)! It states right in their documentation not to use the package in a production environment.

We did add all the other proposed answers such as adding 'WSGIApplicationGroup %{GLOBAL}' to our settings (which we kept), but all of them alone and together didn't solve the issue.

We also found that other C libraries like numpy, cause issues.

Hope this helps someone some day.

Django Webfaction 'Timeout when reading response headers from daemon process'

http://initd.org/psycopg/docs/install.html#prerequisites

like image 54
Paul Tuckett Avatar answered Sep 28 '22 17:09

Paul Tuckett


Turned out to be not the actual problem. The problem was lying deeper, as I changed Cairo to CairoCffi and the RSVG-Handler couldn't deal with the Context-Object coming from Cffi. No my actuall problem is having an up-to-date python lib that allows me to convert svg into png. Using svg2png from CairoSVG isn't working for me. I get an

cairo returned CAIRO_STATUS_NO_MEMORY: out of memory

Error, which I'm sure of, that it does not tell the truth again and the problem lies somewhere else. But lets see.

like image 28
kartopete Avatar answered Sep 28 '22 18:09

kartopete