IL-0527 OpenStreetMap Foundation · 2025-06-25database
OpenStreetMap.org made no replication diffs for 16 hours as PostgreSQL logical decoding failed on a memory alloc error
OpenStreetMap.org publishes minutely, hourly and daily replication diffs that its own services and third parties use to stay up to date with map edits. osmdbt builds them from a PostgreSQL logical replication slot: osmdbt-get-log reads the changes into log data and osmdbt-create-diff writes the diff. PostgreSQL had been upgraded to 15.13-1.pgdg22.04+1 on 30 May 2025. From 21:33 UTC on 25 June the query osmdbt-get-log runs failed every time with ERROR: invalid memory alloc request size 1243650064, and no diffs were produced. The operations team names an unidentified condition in PostgreSQL replication as the cause and considers it possible that recent changes in PostgreSQL 15.13 caused or influenced it.
Alertmanager alerted at 21:40 UTC, but no pager or SMS alert went out, and the team responded early on 26 June. Running osmdbt with fewer changesets per diff produced five diffs before failing again. An operations engineer raised the problem with the osmdbt developer on IRC at 06:49 UTC, and together they worked out a workaround that uses fakelog, an osmdbt component, to skip ahead of the replication condition. Edits had to be suppressed while fakelog was used, so after confirming that the weekly PostgreSQL backup had finished, the team put OpenStreetMap.org into a read-only maintenance window at 12:56 UTC. The manual fakelog runs produced diffs 006/658/640 to 006/658/673 between 13:13 and 13:17 UTC, the osmdbt timer was restarted at 13:21 UTC, and the read-only window ended at 13:22 UTC after about 25 minutes, about 16 hours after the first failure.
- Severity
- –
- Scope
- No OpenStreetMap.org replication diffs for about 16 hours, so tile.openstreetmap.org, Nominatim, Overpass and third-party services could not stay up to date with map edits; the website and mapping API were read-only for about 25 minutes during the fix
- Users affected
- –
- Region
- –
- Time to detect
- 7m
- Time to resolve
- 15h 49m
Symptoms
At 21:40 UTC on 25 June 2025, Alertmanager alerted the OpenStreetMap operations team: minutely replication feed delayed - 6m 2s. Since 21:33 UTC every run of the osmdbt timer that produces the minutely replication diffs had failed with ERROR: invalid memory alloc request size 1243650064.
The error came from PostgreSQL, in the query that osmdbt-get-log runs on the logical replication slot "osmdbt": SELECT * FROM pg_logical_slot_peek_changes($1, NULL, NULL). No minutely, hourly or daily diffs were produced, so tile.openstreetmap.org, Nominatim, Overpass and third-party services stopped receiving map edits. None of the alerts was a pager or SMS alert; the first community report came at 00:37 UTC on 26 June and the first social media report at 01:13 UTC.
At 06:08 UTC on 26 June the operations team stopped the osmdbt timer and ran osmdbt by hand with a reduced maximum number of changesets. Five diffs succeeded, then the error returned, until even --max-changes=1 triggered it. The team and the osmdbt developer looked at whether a huge set of map changes, such as 15 million or more node changes, had overwhelmed the PostgreSQL internal replication logs that osmdbt reads.
Symptom Replication lag
Root cause
Root cause Software defect
- Trigger
- –
Detection
Alertmanager sent the first alert at 21:40 UTC, minutely replication feed delayed - 6m 2s, and several more followed, but none was a pager or SMS alert. A community report followed at 00:37 UTC and a social media report at 01:13 UTC.
Remediation
- Stopped the osmdbt timer
- Put OpenStreetMap.org into a read-only maintenance window to suppress edits
- Ran osmdbt by hand with fakelog to skip ahead of the PostgreSQL replication condition
- Restarted the osmdbt timer for minutely diffs
- Ended the read-only maintenance window
Action items
- Upgrade PostgreSQL to 17.x
- Raise an issue with the PostgreSQL developers
Lessons
Communication with the osmdbt developer was crucial for working out the workaround, and the operations team's understanding of osmdbt was limited.
Sources
References
Related cases
IL-0281PostHog's Logs ClickHouse cluster silently deleted almost all its S3 data, losing US logs older than 3 daysPostHog · 2026same root cause · shared Database, Database replication
IL-0589Every Kickstarter MySQL replica on Amazon RDS stopped replicating on a duplicate-key error in the backings tableKickstarter · 2013same root cause · shared Database, Database replication
IL-0303GitHub's MySQL master failed over to a node with a cold buffer pool during a schema migration and GitHub.com went downGitHub · 2012same root cause · shared Database, Database replication
IL-0451Setting indexes INVISIBLE on Aurora MySQL 3.10 spiked CPU and ReadIOPS on all three readers but not on the writerDaangn · 2026same root cause · shared Database
IL-0313Decagon voice requests stalled for exactly 300 seconds behind self-managed PgBouncer and exhausted the SQLAlchemy poolDecagon · 2026same root cause · shared Database
IL-0310An Aurora PostgreSQL failover to an upsized reader reversed twice and backend writes failed in read-only transactionsHightouch · 2025same root cause · shared Database
IL-0150A latent race condition in DynamoDB's DNS automation left an empty DNS record for dynamodb.us-east-1.amazonaws.com, and the DynamoDB and EC2 launch failures that followed caused EKS, ECS and Fargate container launch failures and cluster scaling delays in us-east-1Amazon Web Services · 2025same root cause · shared Database
IL-0436A supremum lock left by ROLLBACK TO SAVEPOINT in a long transaction blocked inserts and filled Aurora MySQL connectionsfreee · 2025same root cause · shared Database
IL-0329A routine migration left PGAudit stuck holding Postgres locks, causing intermittent timeouts and a 2-minute outageincident.io · 2025same root cause · shared Database
IL-0376A maintenance update set off needless full syncs between Upstash Redis replicas in eu-west-1, slowing the databasesUpstash · 2025same root cause · shared Database replication
IL-0347About 25% of Scaleway FR-PAR-1 hypervisors lost VPC connectivity when both VPC BGP route reflectors got stuckScaleway · 2024same root cause · shared Database
IL-0373Heroku Postgres Essential-tier databases in the EU region ran out of memory and refused connections, twice in four daysHeroku · 2024same root cause · shared Database
IL-0024Expensive cache-backed API calls and uncancelled database requests overloaded MongoDB and took the Hugging Face Hub down three timesHugging Face · 2024same root cause · shared Database
IL-0217Honeycomb's main MySQL database locked up under cache-miss reads and ran out of connections, a 68-minute total outageHoneycomb · 2023same root cause · shared Database
IL-0330Requests timed out for two weeks waiting on Go's database/sql connection pool, one for almost 20 secondsincident.io · 2023same root cause · shared Database
IL-0385GitHub MySQL read replicas hit a semaphore deadlock during a schema migration's table rename and kept crash-recoveringGitHub · 2021same root cause · shared Database
IL-0462Some MySQL pods on Shopify's GKE clusters took up to 30 minutes to start, slowing instance replacementShopify · 2021same root cause · shared Database
IL-0196Adding a second Redis replica and lowering memory limits in one RedisFailover change restarted the only Redis pod that held data, and Sentinel promoted the empty new replica, erasing the dataPalark · 2020same root cause · shared Database
IL-0486Figma's PostgreSQL 9 database on RDS slowed under high write IOPS and lock contention until the site was unavailableFigma · 2020same root cause · shared Database
IL-0241A database shard could not elect a new primary, and the Stripe API failed most requests in two periods on one dayStripe · 2019same root cause · shared Database
IL-0439Database access slowed after each block device and filesystem expansion because the Linux kernel dropped the page cacheCybozu · 2018same root cause · shared Database
IL-0388A Google Cloud live migration took a Discord Redis primary offline, and the failover broke API instances and then guildsDiscord · 2017same root cause · shared Database
IL-0454Baemin billing servers could not open new MariaDB connections at the start of a card-discount eventWoowa Brothers · 2016same root cause · shared Database
IL-0536Amazon SimpleDB in US East returned HTTP 500 to nearly all API calls for two hours after its nodes left the clusterAmazon Web Services · 2014same root cause · shared Database
IL-0485Dropbox went down when an OS upgrade script reinstalled active MySQL master-replica pairs and backup restores ran slowDropbox · 2014same root cause · shared Database
Check your cluster for this
For AI tools and scripts
- This case as JSON: https://incidentlib-api.benchlet.com/cases/IL-0527
- The cases most like it: https://incidentlib-api.benchlet.com/cases/IL-0527/similar
- MCP server (Streamable HTTP, no key):
https://incidentlib-mcp.benchlet.com/mcp
The API needs no key. The MCP server offers search_incidents, get_incident, list_incidents, get_topic and vocab; both are explained on API and MCP.