logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: How to get rid of "Gateway TimeOut" problem?
Author
jack01



Joined: 28 Feb 2014
Posts: 27

PostPosted: Fri 02 Dec '16 14:09    Post subject: How to get rid of "Gateway TimeOut" problem? Reply with quote

Hi,
I have installed Apache 2.4 64-bit on Windows 2008 R2 and it was working fine for a long time. I have upgraded it to: https://www.apachelounge.com/download/VC10/binaries/httpd-2.4.23-win64.zip like a month ago without a problem for whole month, so probably upgrade is not a cause of the problem.

Server is using CGI scripts. Some users have started to report they are getting the "Gateway Timeout" error with details: "The gateway did not receive a timely response from the upstream server or application."

I don't know it looks to me some setting like 60 second or similar is set to timeout.

I have searched the web and found out plenty of forum posts:
https://stackoverflow.com/questions/9629566/how-to-increase-apache-timeout-directive-in-htaccess
https://stackoverflow.com/questions/26742580/504-gateway-time-out-the-server-didnt-respond-in-time-how-to-fix-it
https://unix.stackexchange.com/questions/270655/how-to-find-and-edit-apache-timeout
https://stackoverflow.com/questions/9629566/how-to-increase-apache-timeout-directive-in-htaccess
https://serverfault.com/questions/277386/apache-2-2-cgi-timeout-configuration
all more or less pointing to TimeOut directive.

Looking at official Apache httpd 2.4 documentation for TimeOut:
https://httpd.apache.org/docs/2.4/mod/core.html#timeout
and there is info:
Default: TimeOut 60

To test if this is the setting I am looking for I have set it to absurd low number. At the end of httpd.conf file I have set:
TimeOut 5

and restarted Apache2.4 Windows service. Tested and it looks like it has no effect. I get no error at 5 seconds.

Any idea what may be the setting I am looking for and where/how to set it?
Thanks
Back to top
jack01



Joined: 28 Feb 2014
Posts: 27

PostPosted: Tue 06 Dec '16 8:03    Post subject: Reply with quote

Hi,
it looks like TimeOut is actually working fine. Now I have set the TimeOut to be the second command in httpd.conf (right after ServerRoot) and set it to 5 seconds and it looks like browser web page freezes instead of returning Gateway Timeout. I wasn't expected this.

But setting "TimeOut 300" and my problem disappeared.

P.S. Maybe there is also important where in the httpd.conf file this command is located, I have found one web page with example at the second place, so I did it this way.
Thanks
Back to top


Reply to topic   Topic: How to get rid of "Gateway TimeOut" problem? View previous topic :: View next topic
Post new topic   Forum Index -> Apache