Suddenly my server got crashed out of nowhere

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.

Checked the EC2 monitoring log, and nothing was found out

Adding the machine stats too

Note - I am not able to ssh into the machine it is showing port22: connection refused

Please kindly help asap

Is this a Discourse instance or a Wordpress instance? (note that you posted in the wordpress category).

Oops so sorry for that out of rush I made that mistake, its not related to Wordpress at all.
Thank you for your response.

Looks like it’s working now?

1 Like

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.

T2.small wouldn’t work?

Are you sure the resize fixed it and not just the restart triggered by the resize operation?

It’s going to be much harder to identify the cause now that you’ve altered the configuration.

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.

1 Like

Here is the stats for the day when this crashed has been happened

Note - This below image is my currrent stats for CPU credit