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 Answer
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
EXPERT
answered a year ago
  • 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"
    

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions