php - AWS 上的 504(网关超时)

标签 php ajax apache amazon-ec2 timeout

我的 Web 应用程序在 AWS EC2 实例上运行 PHP,我进行了大约 5-10 分钟的 ajax 调用,我在 Google Chrome 中看到了 Web 控制台,我得到了这个 504(网关超时) ,我如何增加它的值(value),这与 apache 有关吗? 谢谢

最佳答案

ELB 默认超时时间为 60 秒;尽管this page,我没有办法扩展这个限制。建议这是 Amazon Support 可以为您做的事情(并且还建议解决该问题的方法):

Point 6) Amazon ELB timeouts at 60 seconds (kept idle)

Amazon ELB currently timeouts persistent socket connections @ 60 seconds if it is kept idle. This condition will be a problem for use cases which generates large files (PDF, reports etc) at backend EC2, sends them as response back and keeps connection idle during entire generation process. To avoid this you'll have to send something on the socket every 40 or so seconds to keep the connection active in Amazon ELB. Note: I heard we can extend this value after explaining the case to AWS support team.

编辑:正如下面的评论者所指出的,截至 July 24th, 2014这可以在您的 AWS 控制台中配置。

关于php - AWS 上的 504(网关超时),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20083673/

相关文章:

php - 如何重置密码,盐

php - SELECT 查询案例导致问题

php - mysql语句的写法

php - 使用 Laravel 上传多张图片

Apache 将所有请求转发到特定的静态文件

php - 使用 XMLHttpRequest 上传文件

javascript - 为动态元素提供 ID

javascript - Jquery getJSON 未使用有效的 json 响应触发回调

linux - LAMP管理界面

java - 是否可以使用 Apache POI 设置 "spans"中一行的 "worksheet#.xml"属性