Application -> Cloudfront 500 error

1

We have an application report called https://www.open.edu/openlearncreate/report/ocwcourseactivity/index.php?course=6954, a custom report within a Moodle application, which is served by CloudFront.

It is a staff facing report that can only be accessed by logging in. Once logged in, it is currently throwing a 500 error on our live system, but not on any of our dev or staging platforms. We tried to investigate the error by turning off the 500 error page rule redirect in our CloudFront distro (we only have one for this account). What resulted was surprising.

The http repsonse returned the report in the code as if the application successfully hadnled the request, whereas, observing the dev tools the actual response itself returned a status of 500. I then investigated both the apache logs and saw that the response from appache was a 200 ok response. When I investigated the CloudFront access logs, I could see that the response was 500.

Therefore, what seemed like an application error on the face of it, now seemed to be an error resulting from a service in between the application and the CloudFront. Could this be the ALB, the container, or Cloudfront itself. The CloudFront logs say it is an originerror. The origin for this particular report would be either... /openlearncreate/report//.php SlowRequestsOLC OR /openlearncreate* olclive-internal.open.edu Both of these origins point to our internal load balancer.

Please can you assist us to find out where the issue may be occuring? If we want to try to troubleshoot this by making a call to obviate CloudFront, is there a recommened way to do this?

DamianH
已提问 8 个月前825 查看次数
1 回答
0

If CloudFront logs are indicating an origin error, it means that when CloudFront is requesting an object from your origin, the origin is returning an 500 status code i.e. there's a problem with communication between CloudFront and your origin.

In this scenario, you can check the access logs of the ALB for the requested path '/openlearncreate/report/ocwcourseactivity/index.php?course=6954'. If the access logs are not enabled on the ALB yet, please refer to the following documentation to enable the same: https://docs.aws.amazon.com/elasticloadbalancing/latest/application/enable-access-logging.html

Access logs contain detailed information about requests sent to your load balancer. Each log contains information such as the time the request was received, the client's IP address, latencies, request paths, and server/backend responses. You can use these access logs to analyze 500 errors. It will help you to conclude whether the requests are originating from the ALB or the target container.

Additionally, I would also request you to reach out to the AWS support team via Support console with CloudFront distribution domain name and request ID and we will investigate the same in detail.

Hope the information provided above is helpful. Have a great day ahead.

AWS
支持工程师
已回答 8 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则