502.3 Error when accessing Application on localhost

We are running Umbraco CMS on Windows Platform, when accessing the URL, end users are getting 502 errors randomly, and during that time localhost is also throwing 502.3 error which also recovers after some time and URL again becomes accessible, What could be the possible reason for this? and how we can fix this?

Can you give more information? Like: what version of Umbraco, do you have a proxy? Where is the hosting platform?

yes we are hosting on AWS Beanstalk and umbraco Version is 13 based on Windows Platform and No Proxy

Do you get anything in the logs around the times it happens?

See if this is helpful
Error 100:Application Crashing Events Application Error - Faulting application name: ApplicationName.exe, version: 1.0.0.0, time stamp: 0x66960000

Faulting module name: KERNELBASE.dll, version: 10.0.20348.3207, time stamp: 0x2841fd35

Exception code: 0xe0434352

Anything in the Umbraco logs? Settings > Log viewer

Are you load balancing at all? If so have you followed the docs - Umbraco in Load Balanced Environments | Umbraco CMS

Matt

This indicates an unhandled exception, which will only be logged in the windows logs, so you’ll need access to the event viewer on your server.