I don’t know what has happened but when I am trying to access my site which is hosted on EC2 t2.micro server based on ubuntu 22 which was running very smoothly few hours ago, no changes and nothing was changed at our end, no upgrades nothing everything was stable but suddenly it is showing like this.
yes it’s working because I have changed my server configuration from t2.micro to t2.medium, but I don’t what exactly the problem was because I have to report it.
To increase the memory I have used t2.micro.
Actually at that time visitors were coming because we were running a campaign but that was not huge number of visitors it would be around 1K or below that so in that scenario I have to fix this and this is the only thing which got fixed the issue at that time.
I was not able to logged into the system at that time so I have to do this, but now I have to know exact reason which caused that issue.
If needed any more details please let me know.
Note:- I tried to restart the instance but that didn’t worked out too.
Are you monitoring the CPU credits for this instance?
I moved back from EC2 to a VPS because I kept getting some occasional issues like this: my website got inaccessible and after some investigation it was always the CPU credits being used quicker than they were earned and reaching 0 credits, the lack of credits turns the instance into “baseline performance”, which is unusable (10% for a t2.micro).
It’s possible that when you switched to a bigger instance you started getting more CPU credits/hour and, with >0 credits, it was back to normal performance and “fixed” the issue.