🚀 Executive Summary

TL;DR: Lightsail instance slowness is typically caused by exhausted CPU burst credits, leading to severe throttling. The problem can be solved by identifying resource hogs, vertically scaling the instance, or decoupling the database to a Lightsail Managed Database for dedicated resources.

🎯 Key Takeaways

  • AWS Lightsail instances utilize ‘Burstable Performance’ hardware, meaning CPU resources are not 100% dedicated and rely on a system of CPU credits.
  • When CPU burst credits are exhausted, Lightsail instances are hard-throttled to a very low baseline CPU percentage (e.g., 5%), causing significant performance degradation.
  • Monitoring the ‘Burst Capacity Percentage’ graph in the Lightsail console is critical for diagnosing CPU credit exhaustion, which often manifests as the graph flatlining at 0%.

Lightsail instance very slow

Quick Summary: Is your AWS Lightsail instance crawling at a snail’s pace? Discover why CPU burst credits are the silent killer of performance and three engineering-grade solutions to fix it for good.

Why Your Lightsail Instance is Crawling (And How to Fix It)

I still remember the panic in my junior engineer’s voice when he called me at 11:30 PM on a Tuesday. “Darian,” he stammered, “The prod-marketing-wp server is up, but it’s taking 45 seconds to load a static page. I’ve restarted Apache three times. I think we’re being DDoS’d.”

I logged in. The SSH terminal was lagging so hard my keystrokes were appearing three seconds after I hit them. It wasn’t a DDoS attack. It wasn’t a hacked kernel. It was something far more mundane and annoying: we had exhausted our CPU burst credits. We were trying to run a marathon on a sprinter’s energy budget.

If you found this post because your $5 or $10 Lightsail instance suddenly feels like it’s running on a floppy disk, you aren’t alone. Here is the reality of the situation, stripped of the marketing fluff.

The “Why”: The Burstable Performance Trap

Here is the hard truth: Your Lightsail instance does not have 100% of a CPU core dedicated to it. Unless you are buying specific heavy-duty instances, you are on “Burstable Performance” hardware (similar to T2/T3 instances in EC2).

Think of CPU credits like a bucket of water:

  • The Baseline: The bucket fills up slowly (this is your baseline CPU accrual, usually 5% to 20% depending on instance size).
  • The Burst: When traffic spikes, you scoop water out faster than it fills up.
  • The Drought: If you run a heavy process (like a backup plugin or a compile job) for too long, the bucket runs dry.

Once that bucket is empty, AWS hard-throttles your CPU down to its baseline. On a $3.50 instance, that baseline is often around 5% of a core. Try running a modern MySQL query with 5% of a CPU. That is why your site is slow.

Pro Tip: Check the “Metrics” tab in your Lightsail console. Look at the “Burst Capacity Percentage” graph. If it is flatlining at 0%, stop troubleshooting your code. It’s a resource issue.

Solution 1: The Quick Fix (Kill the Hog)

Before you swipe your credit card for a larger server, you need to verify what ate your credits. Often, it’s a runaway process or a bad configuration.

If you can manage to SSH in (it might take a few tries), use htop to find the culprit. If you don’t have it installed, get it. It’s better than `top`.

sudo apt-get update && sudo apt-get install htop
sudo htop

Sort by CPU. If you see mysqld or php-fpm pinning the CPU at 100% consistently, you have a leak or a query from hell. Sometimes, simply restarting the specific service clears the jam and lets your CPU credits recover slowly.

# For the LAMP stack folks
sudo service apache2 restart
sudo service mysql restart

This is a bandage, not a cure. But it stops the bleeding long enough for you to think.

Solution 2: The Permanent Fix (Upsize the Box)

If your business is growing, stop trying to squeeze enterprise performance out of a sandbox environment. If you are consistently hitting 0% burst capacity during normal business hours, your baseline requirement is higher than what you are paying for.

You need to vertically scale. In Lightsail, you cannot just “change” the instance type on the fly like a jacket. You have to perform the Snapshot Swap.

The Snapshot Swap Protocol:

  1. Go to the Lightsail Console.
  2. Select your instance (e.g., web-prod-01) and click Stop. (Do not skip this; snapshots on live DBs are risky).
  3. Click Snapshots -> Create Snapshot.
  4. Once finished, click the three dots on the new snapshot and select Create new instance.
  5. Crucial Step: Choose the next size up (e.g., go from $5 to $10).
  6. Update your Static IP to point to the new instance.

This doubles your RAM and, more importantly, increases your CPU credit accrual rate.

Solution 3: The ‘Nuclear’ Option (The Database Divorce)

In my experience, 90% of Lightsail performance issues are actually database issues. MySQL loves RAM. If you are running the web server and the database on the same $5 instance, they are fighting for resources like two dogs over one bone.

The “Nuclear” option—which is actually the correct architectural decision—is to decouple them.

Architecture Pros Cons
All-In-One Cheap ($5/mo), simple setup. Single point of failure, resource contention.
Decoupled (App + Managed DB) Scalable, DB gets its own dedicated resources, auto-backups. Costs more (starts at +$15/mo for Managed DB).

Move your database to a Lightsail Managed Database. Yes, it costs $15/month minimum. But it removes the database load from your web server’s CPU credits. Your web server will suddenly feel incredibly snappy because it’s only doing what it’s good at: serving HTTP requests.

Is it more expensive? Yes. Is your sanity worth $15 a month? I’d argue yes.

Darian Vance - Lead Cloud Architect

Darian Vance

Lead Cloud Architect & DevOps Strategist

With over 12 years in system architecture and automation, Darian specializes in simplifying complex cloud infrastructures. An advocate for open-source solutions, he founded TechResolve to provide engineers with actionable, battle-tested troubleshooting guides and robust software alternatives.


🤖 Frequently Asked Questions

âť“ Why is my AWS Lightsail instance suddenly very slow?

Your Lightsail instance is likely slow due to exhausted CPU burst credits. These instances operate on a ‘Burstable Performance’ model, and once credits are depleted, the CPU is hard-throttled to a low baseline, severely impacting performance.

âť“ How does Lightsail’s burstable performance compare to dedicated EC2 instances?

Lightsail’s burstable performance is similar to EC2 T2/T3 instances, offering a baseline CPU with the ability to burst using credits. Dedicated EC2 instances (e.g., M-series, C-series) provide a consistent, dedicated CPU core without credit limitations, making them more suitable for sustained high-performance workloads but at a higher cost.

âť“ What’s a common implementation pitfall when trying to fix a slow Lightsail instance?

A common pitfall is troubleshooting application code or network issues when the root cause is actually exhausted CPU burst credits. Always check the ‘Burst Capacity Percentage’ graph in the Lightsail console first; if it’s at 0%, the problem is resource throttling, not typically code.

Leave a Reply

Discover more from TechResolve - SaaS Troubleshooting & Software Alternatives

Subscribe now to keep reading and get access to the full archive.

Continue reading