I get "Gateway Timeout"

504: The gateway did not receive a timely response from the upstream server or application.

I use apache with mod_wsgi Version 4.4.8.

In the apache error log I see:

Timeout when reading response headers from daemon process 'md':

The wsgi config:

WSGIDaemonProcess md user=mc group=users threads=1 processes=4
WSGIScriptAlias /mc /home/mc/src/mc/mc/mc.wsgi
<Location "/mc/">
    WSGIProcessGroup md
    WSGIApplicationGroup %{GLOBAL}
    Require all granted

The timeout happens after 100 seconds.

The timeout according to config is 600 seconds.

I have no clue why this happens. It is repeatable. The error is repeatable. It happens every time for a particular URL.

Step one would be for me: A better error message. Who is responsible for this message "Timeout when reading response headers from daemon process"?


I found the solution myself.

There was Timeout 100 somewhere in the Apache config.

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.