I have website https://www.b-yy.com, which is hosted on cloudflare -> Aws ELB -> EC2 instance. the instance behind ELB says that it is healthy and "InService", but whenever i open website, it says that 503 Backend server is at capacity.

How is it possible that if back-end server is in healthy state and still ELB gives 503 back-end server is at capacity?

When i access the website without CF and using only the IP, website works perfectly fine, server has no load, its running nginx. its has lot of CPU, no performance issue, just with few requests it starts saying that 503 only on ELB, but when i access same server with IP, website loads fine, even with lot of load on it, it keeps working ok.

From the server logs, the ELB Health checks, all of them are 200 response time with OK. none of tests fail at all.

  • 1
    What do the Nginx error / access logs say? Is the 503 being returned by Nginx or ELB? You need to use the AWS tools (ie CloudWatch) to distinguish between HTTPCode_Backend_5XX and HTTPCode_ELB_5XX docs.aws.amazon.com/elasticloadbalancing/latest/classic/… – Tim Nov 25 '16 at 20:48
  • in Server logs, there is nothing like any error like 5XX. – Farhan Nov 25 '16 at 21:06
  • What does CloudWatch say? Read the link I posted, understand how that works, do some analysis. – Tim Nov 26 '16 at 0:34
  • If this hasn't been solved, I'd have recommended throwing cloudfront into bypass mode, or hit the ELB directly (might need to use the host header trick). You mention the the instance appears to be 'In Service', is that what it shows up as on the load balancer status? Or one of the other statuses, if it's the latter, check your elb health check. – KHobbits Nov 29 '16 at 1:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.