Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

504 Gateway Time-out The server didn't respond in time. How to fix it?

Tags:

The client requested to download a compressed log file, using Ext.js a form submission on an embedded iframe. Request was sent to server, which has Apache and JBoss 6. The servlet compresses log files, do some database operation and returns the compressed file.

Exactly after 2 min, the 504 Gateway Time-out The server didn't respond in time message is seen at the browser net panel. How to fix this error?

like image 467
Ricardo Avatar asked Nov 04 '14 18:11

Ricardo


People also ask

Can I fix 504 Gateway Timeout?

Reboot Your Network Devices Sometimes, problems with your network devices like modem or router could lead to a 504 Gateway Timeout error. Rebooting these devices could help you with fixing the problem. While you can switch off all these networking devices in any order, the order you switch them back on is important.

What does it mean when it says 504 Gateway Timeout?

The HyperText Transfer Protocol (HTTP) 504 Gateway Timeout server error response code indicates that the server, while acting as a gateway or proxy, did not get a response in time from the upstream server that it needed in order to complete the request.


1 Answers

The servlet was taking a long time to compress the log files, and Apache's timeout was set to 2min.

The error was fixed by increasing the TimeOut Directive on the httpd.conf file:

# # Timeout: The number of seconds before receives and sends time out. # ##Timeout 120 Timeout 600 
like image 68
Ricardo Avatar answered Sep 21 '22 16:09

Ricardo