简体   繁体   English

AWS Elastic Beanstalk 504网关超时期间会发生什么

[英]What happens during AWS Elastic Beanstalk 504 Gateway Timeout

I have a Django server running in Elastic Beanstalk and I am not sure if the process continues to run in the server or the process gets killed. 我有一个在Elastic Beanstalk中运行的Django服务器,不确定该进程是否继续在服务器中运行或进程被杀死。 Does anyone have any insight on this? 有人对此有见识吗? There is no application logic to stop the request in case of a disconnection. 在断开连接的情况下,没有应用程序逻辑来停止请求。 Would Elastic Beanstalk kill off the process along with the client connection or will the process continue to run regardless of the timeout? Elastic Beanstalk会终止与客户端连接的进程,还是不管超时如何都继续运行该进程?

A 504 Gateway Timeout means the client trying to access the server doesn't get a response in a certain amount of time. 504网关超时表示尝试访问服务器的客户端在一定时间内未获得响应。 According to the AWS documentation : 根据AWS文档

Description : Indicates that the load balancer closed a connection because a request did not complete within the idle timeout period. 说明 :表示负载平衡器已关闭连接,因为请求没有在空闲超时时间内完成。

Which means, the 504 response you get in your browser (or other client) when trying to access your Django app is generated by the Elastic Load Balancer that's in front of your actual server after closing the connection. 这意味着,在尝试访问Django应用程序时在浏览器(或其他客户端)中收到的504响应是由关闭连接后位于实际服务器前面的Elastic Load Balancer生成的。 Since your ELB is an external networking tool and has no actual control over your server, it cannot control your code and which processes are running or not. 由于您的ELB是外部网络工具,并且对服务器没有实际控制权,因此它无法控制您的代码以及正在运行或未运行的进程。 Meaning, the process will keep running until it has to return an HTTP response and it fails because of the closed connection. 这意味着,该进程将一直运行,直到必须返回HTTP响应并且由于关闭连接而失败。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM