AWS EBS runs into “504 Gateway Time-out”

早过忘川 提交于 2021-02-11 15:14:16

问题


I'm new to using AWS EBS and ECS, so please bear with me if I ask questions that might be obvious for others. To the issue:

I've got a single-container Node/Express application that runs on EBS. The local docker container works as expected. On EBS, I can access one endpoint of the API and get the expected output. For the second endpoint, which runs longer (around 10-15 seconds) I get no response and run after 60 seconds into a time out: "504 Gateway Time-out".

I wonder how I would approach debugging this as I can't connect to the container directly? Currently there isn't any debugging functionality in the code included either as I'm not sure what the best node approach for a EBS container is - any recommendations are highly appreciated.

Thank you in advance!


回答1:


You can see the EC2 instances running on EBS in your AWS, and you can choose to give them IP addresses in your EBS options. That will let you SSH directly into them if you need to.

Otherwise check the keepAliveTimeout field in your server (the value returned by app.listen() of you're using express).

I got a decent number of 504s when my Node server timeout was less than my load balancer timeout.



来源:https://stackoverflow.com/questions/64664476/aws-ebs-runs-into-504-gateway-time-out

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!