Skip to content

Github Actions: Possible reasons why a connected Flask application on Ubuntu (AWS Lightsail) stops working after few hours without any change in code

0

The code was initially on Codespace for the Flask application and then pushed to an Ubuntu instance (AWS Lightsail). After spending more than 12 hours, the Flask web application that uses Nginx and Gunicorn got live connected with a custom domain. To be honest, I understood little while keep taking help of an AI tool to troubleshoot.

But after an hour or so as I thought to check the website, it is showing 404 error. I will initiate troubleshooting but still it will help to know the possible reasons. Is it hacked because security features not properly applied?

asked 2 years ago446 views
1 Answer
0

Hi Rajeev,

Are you seeing persistent errors, or transient errors? Sometimes people provision an instance that is too small for their workload, which leads to cycles of low performance and inability to connect.

You should be able to audit your instance performance metrics to see if CPU bursting is causing the issues you've encountered. https://docs.aws.amazon.com/en_us/lightsail/latest/userguide/amazon-lightsail-viewing-instance-burst-capacity.html#baseline-cpu-performance

Please let us know if you determine CPU burst capacity is the culprit or not. If it is due to the CPU bursting, you may want to consider upsizing the instance as detailed here https://docs.aws.amazon.com/lightsail/latest/userguide/how-to-create-larger-instance-from-snapshot-using-console.html or consider limiting CPU use by heavier applications or cron jobs.

AWS
MODERATOR
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.