简体   繁体   中英

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. After 4 months of usage, suddenly the POST request for creating users failed with a 504 Gateway Time-out. No modification were made to the code or elastic beanstalk config in the meantime whatsoever. 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. Tried Apache as a proxy and this gave a similar error.

Environment

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

After trying almost everything we are out of options. Any suggestions?

Thanks in advance, Mk

If you're using an ELB, try setting the "Idle Timeout" to a higher time value. You can do this using the 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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