API gateway URL reverting status code 0 and 503 intermittently

0

Hi All,

We are using AWS ECS Fargate ALB & API gateway to serve our API, mostly its is always healthy, but at time it throws status code 0 or 503, sharing the error message that is accompanied with these statuses. We have 1 task always active and trigger another one on 80% CPU load. But we always see 2 tasks active though it barely uses .25 CPU and 512 Memory system. We are not sure what is the issue here and why we keep getting these errors. Not sure if it has anything to do with the size of the payload received. Timeout is set to 15 secs at API gateway level. Not sure where we are going wrong. Any help here is much appreciated.

Error Status & Message

Status 0:
"responseBody":".execute-api.ap-south-1.amazonaws.com: Temporary failure in name resolution"

Status 503:
"responseBody":"<html> <head><title>503 Service Temporarily Unavailable</title></head> <body> <center><h1>503 Service Temporarily Unavailable</h1></center> </body> </html> "
1개 답변
0

I would be looking closer at your applicaiton. Perhaps the web server is too busy to respond to requests, perhaps you have a threading issues where it has run out of threads

Just because the CPU is fine, you may stil have some performance tuning of your applicaiton/underlying listeners in your container to perform. I would ensure your application is sending enough log information to review and you could even test connecting directly to your application when you experience the 503 errors.

You could connect into the container also during the time it has issues if its logging locally

If this answers your question, please be sure to accept so that this helps others and helps me

profile picture
전문가
답변함 일 년 전
  • Hi @Gary Mclean, Thanks for your inputs, the 503 was some aws outage is not happening since then. Also we use threading and the API handles multiple request without a challenge. However, we still are getting Error Status Code 0 in our app, wondering how the Name is Resolved other times expect very few (maybe 2-3 time a day). This is quite puzzling.

    Status 0:
    "responseBody":".execute-api.ap-south-1.amazonaws.com: Temporary failure in name resolution"
    

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인