Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Neon 4 min read Incident mediumAdept

Delayed Start Compute Operations – Triggering Event

Neon's 2025-05-16 us-east-1 outage was triggered when the Postgres planner for the control plane database switched to a suboptimal index for the Activity Monitor query that finds idle Computes to suspend. The resulting broad scan of the tens-of-millions-row computes table saturated CPU and pushed fetchEndpointWithCompute latency from hundreds of milliseconds to over 100 seconds. With suspensions stalled, running VMs grew past the planned 6,000 and IP allocation failed. Neon fixed it by running ANALYZE and wrapping the expensive subquery in a materialized CTE as an optimization fence. Planned follow-ups include more aggressive garbage collection to shrink the table and moving historical data to an OLAP system.

Related posts

  • Postmortem: Delayed Start Compute Operations

    Neon mediumAdept

    A query plan change overloaded Neon's control plane database in AWS us-east-1, which stopped it from suspending idle databases. Running pods climbed to about 8,000, and those pods used up the IP addresses in two of the three subnets, so customers couldn't create or wake scale-to-zero databases for 5.5 hours across two days. Mitigation meant upscaling the control plane database, adding temporary proxy rate limiting, and setting the AWS CNI WARM_IP_TARGET and WARM_ENI_TARGET to 0. Restoring WARM_IP_TARGET=1 three days later caused IP allocation to fail again even though free IPs were available, and that was eased by doubling prewarmed compute pools. Follow-ups include doubling the VPC subnets and a new Kubernetes 'Cells' architecture.

  • Cold starts just got hot

    Neon mediumAdept

    Neon cut serverless Postgres compute cold starts from 3-6 seconds to roughly 500 ms by skipping work and reframing the problem. Idempotent configuration application (1-1.5 s) now runs only when tracked config changes require it, which needed a new model where computes fetch their own config. Pre-started compute pools hand out an empty compute and configure it in a few hundred milliseconds, recycling idle computes and falling back to on-demand creation. Smaller gains came from networking setup changes, caching internal IPs to avoid DNS waits, added concurrency and hot-path optimization. Planned work includes regional control planes and autoscaling computes so one pool can serve all sizes.

  • Monitor These Key Neon Metrics Via Datadog

    Neon mediumAdept

    Neon now exports database metrics to Datadog via an API-key integration covering all computes in a project. The metrics include connection counts, replication lag, CPU and memory, Local File Cache hits and misses, an estimated working set size, and pg_stat_database aggregates. A low LFC hit ratio or high miss count usually means the working set exceeds cache memory and reads are falling through to pageserver getpage requests, so the fix is a larger compute or better queries and indexes. Watching working set size trends, deadlocks and row operations helps with autoscaling limits and spotting inefficient queries, and an importable JSON dashboard is provided.

  • Incident Review: Pageserver outage in us-east-1

    Neon mediumAdept

    A sudden EC2 instance failure took down a Neon pageserver in us-east-1, leaving about 0.4% of projects unable to read uncached pages for 30 minutes to 2 hours. No data was lost because S3 holds durable storage and secondary locations were pre-warmed. Recovery was slow for three reasons: alerting had a human in the loop and took about 30 minutes, a semi-manual script took about 40 minutes to migrate 17,037 projects, and roughly 20 projects with in-flight operations needed manual fixes. The fix is moving all projects to the Storage Controller, a reconciliation-loop scheduler with its own heartbeats that treats every pageserver call as fallible and fails work over in seconds without human intervention.

  • A Recap on May/June Stability

    Neon mediumAdept

    Neon's May and June 2025 incidents were caused by a load surge from agentic AI platforms. Database creation rose more than 5x and branch creation more than 50x. In May, US regions hit Kubernetes scaling limits around 10,000–12,000 concurrent database pods: EKS etcd memory, pod start times, network configuration and API rate limits. Stopgap tuning raised risk until the horizontally scaled "Cells" architecture shipped. In June, branch metadata growth in the Postgres-backed control plane caused query plan drift, vacuum pressure and expensive billing queries. Fixes include stricter limits on every workload dimension, tests with high-branch-count scenarios, defensive query rewrites, moving billing data to an analytical store, and splitting start/suspend hot-path logic into a small isolated service.

The quest for software engineering knowledge.

Look:
Layout: