504网关超时服务器没有及时响应。如何解决?

问题描述:

客户端请求下载压缩日志文件,使用 Ext.js 在嵌入式的iframe 。请求已发送到服务器,该服务器具有 Apache JBoss 6 servlet 压缩日志文件,执行一些数据库操作并返回压缩文件。

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.

确切地在2分钟后, 504网关超时服务器没有及时响应消息在浏览器网络面板中看到。如何解决这个错误?

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?

servlet 需要很长时间来压缩日志文件, Apache 的超时设置为2分钟。

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

错误是通过增加 httpd.conf 文件中的rel =nofollow noreferrer> TimeOut指令:

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