I'm encountering an intermittent 502 Bad Gateway issue with my Express.js server after it runs for approximately 4-5 days. To address this, I need help in identifying the root cause of the problem and implementing an automated solution for server restarts. Specifically, I'm seeking guidance on how to detect when APIs are down and automatically trigger a server restart. Any debugging tips, best practices, or insights into common misconfigurations leading to such issues would be highly valuable.
I've checked the logs without finding specific error messages related to the 502 issue, and manually restarting the server temporarily resolves the problem. Any assistance or guidance would be greatly appreciated. Thank you!
I'm encountering an intermittent 502 Bad Gateway issue with my Express.js server after it runs for approximately 4-5 days.