0

I have a website that handles ticket selling which opens once a year. Many peoples come to the website at a specific date and time. However, some users received 504 Status Code (Gateway Timeout) from AWS CloudFront .Some users can still register successfully in this period of time.

I checked the Google analytic statistic and discover some strange things. The statistic shows that the user's number is around 800-999 per minute since the registration open. I am pretty sure that more than 1000 users want to access the site at that time. I guess the users are limited to below 1000 per minute so the 504 pages appear for some user.

I checked this page but I am not familiar with AWS. https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/http-504-gateway-timeout.html

I am not the server admin and I am just a programmer. I remember a similar situation occurred on my company's other site a long time ago. It takes nearly 3 months to figure out the problem at that time because the server admin said that it is my program problem. However, that website only contains frontend content. Finally, the server admin increases the traffic limit to solve the problem.

This time, I am pretty sure this is due to the traffic limit. How can I check the limit of CloudFront Traffic? I want to check it by myself. I have the access right as Linux root user. I can use PUTTY and FileZilla only. Is it possible to check? Or do I need to enter the AWS panel? If yes, how?

Thankyou.

Andrew Schulman
  • 8,561
  • 21
  • 31
  • 47
Muffin
  • 1
  • Read this ( https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/http-504-gateway-timeout.html ). Best guess is your server is overloaded and CloudFront is timing out. I don't think there's a user limit available on CloudFront. – Tim Oct 24 '20 at 08:22
  • Thanks Tim. In the AWS panel, the CPU and RAM usage is only around 18%.Is this means that the server is not overload? – Muffin Oct 25 '20 at 03:20
  • Are you saying RAM usage is 18% or CPU usage is 18%? I suggest you use the top command to look at CPU usage when it's busy. – Tim Oct 25 '20 at 03:33
  • The server admin said that the RAM usage is 18% and CPU usage is 20% at that moment. But it still return the 504 page. – Muffin Oct 25 '20 at 05:28
  • 504 error is gateway timeout, as per your link. It could be the web server isn't configured to let that much traffic in - perhaps maximum threads / workers is too low. You can also try looking at CloudFront logs to see if they give you any clues. I doubt anyone will say "I know what the problem is, do this", I think you're going to have to produce load, monitor, benchmark, and work through the problem. The problem is the server, not CloudFront. – Tim Oct 25 '20 at 06:29

0 Answers0