Skip to main content

Sudden Traffic Spike

When traffic unexpectedly spikes, your database is often the first thing to buckle. pgpulse helps you stay calm and find the bottleneck quickly.

What to look at first

Check these signals in order:

  1. Connections: Are you hitting your limit? If so, your pooler may need adjustment or you may have a connection leak.
  2. CPU & Load: Is the CPU pegged at 100%? If so, look for a newly surfaced slow query or a table that lost its index.
  3. Locks & Blocking: Check for a long-running transaction (e.g., a background job) that is blocking all the new API traffic.
  4. IO: Are you hitting disk limits (especially common on burstable storage)?

Quick Mitigations

  • Kill the Blocker: If a single background job is blocking the entire app, terminate it to restore service.
  • Scale Up: If you're on Supabase or a managed provider, a quick instance upgrade can buy you time to find the real root cause.
  • Enable Rate Limiting: If the traffic is malicious or a specific endpoint is causing the pain, add application-layer rate limiting.