简体   繁体   English

504特定POST请求的网关超时

[英]504 Gateway Time-out on specific POST request

Since the discussion forums of Amazon gave an error im posting the question here. 由于亚马逊的讨论论坛在将问题发布到此处时出现错误。

We are running a single nodejs (api) instance with Elastic Beanstalk. 我们正在使用Elastic Beanstalk运行单个nodejs(api)实例。 After 4 months of usage, suddenly the POST request for creating users failed with a 504 Gateway Time-out. 使用4个月后,创建用户的POST请求突然因504网关超时而失败。 No modification were made to the code or elastic beanstalk config in the meantime whatsoever. 在此期间,未对代码或弹性beantalk配置进行任何修改。 The rest of the requests are working correctly. 其余请求正常运行。 When testing locally there are no errors. 在本地测试时,没有错误。 In the nginx error log the following occurs: Upstream timed out (110: Connection timed out) while reading response header from upstream. 在nginx错误日志中,将发生以下情况:上游超时(110:连接超时),同时从上游读取响应头。 Tried Apache as a proxy and this gave a similar error. 尝试将Apache作为代理,这给出了类似的错误。

Environment 环境

  • 64bit Amazon Linux 2016.03 v2.1.0 running Node.js 运行Node.js的64位Amazon Linux 2016.03 v2.1.0
  • Nodejs 4.3.0 Nodejs 4.3.0
  • Nginx 1.8.1 Nginx 1.8.1

After trying almost everything we are out of options. 在尝试了几乎所有内容之后,我们无法选择了。 Any suggestions? 有什么建议么?

Thanks in advance, Mk 预先感谢,Mk

If you're using an ELB, try setting the "Idle Timeout" to a higher time value. 如果您使用的是ELB,请尝试将“空闲超时”设置为更高的时间值。 You can do this using the AWS CLI : 您可以使用AWS CLI执行此操作:

aws elasticbeanstalk update-environment --environment-name your-env-name --option-settings Namespace=aws:elb:policies,OptionName=ConnectionSettingIdleTimeout,Value=300

I'm not sure if you can do this from the UI but I don't think so. 我不确定您是否可以从用户界面中执行此操作,但我不这样认为。

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

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