AWS | LightSail | CPU Credits


AWS LightSail is very slow and the answer… I was out of CPU Credits:

Well, I’m ashamed to admit it, but yes, my site has been non-accessible – unless you waited 5-10 minutes for it to SLOWLY LOAD…

I host everything on AWS, single vendor, single region, single availability zone. Look, I know.

Initially, I thought my system was bogged down due to the service I chose (super cheap instance of Lightsail..).

After waiting a week and for the billing cycle renewal. The issue persisted.

*Typically, I would never wait this long to resolve an issue, but since it’s my personal website – it’s non-critical and extremely low priority…

After researching “Lightsail Extremely Slow Performance” (You know, the obvious), I ended up on Reddit and Stack Exchange. The issue? I was out of CPU credits. I didn’t have a lot of time to research why this was happening, but I assumed it was a mixture of plugins, site traffic, and background processing that was pushing my CPU load past the suggested marks and eating up all of my CPU credits for the hour(s).

The Solution:

  1. I created a snapshot of my instance from LightSail and copied it to a new instance. This time, I chose an instance with double the resources, but still, only one vCPU.
  2. I detached my old static IP from the initial instance and re-attached it to the new instance.
  3. Waited for the cache to clear and BOOM! My site was back online and operating like normal.

Checkout this post if you want to see how to upgrade: Upgrading Lightsail instance with minimal downtime

Tags , ,

How can we help?