Catalogue / strava-2014-upload-outage

Strava's uploads were disrupted for almost 14 hours when a stream metadata table's signed four-byte id reached 2147483647

Strava, 2014. Upload processing and its stream metadata table.

Organisation
Strava
Evidence
Incident report
System
Upload processing and its stream metadata table
As of
2014-07
Source
The Upload Outage of July 29, 2014

Strava Engineering Blog, published 2014-07-30 (Read from an Internet Archive copy captured on 2015-09-06; the original address answered HTTP 404 when fetched on 2026-12-02.)

Architecture

Processing an upload identifies and stores several time-indexed streams of data (location, distance, speed and so on). The stream data is stored on Amazon S3; metadata saying which streams belong to an activity is a table in a database, each row with an auto-incrementing identifier. Uploads are processed by background jobs.

Section: What Happened | Near: but with all background job processing disabled

Figures, as the source states them

FigureAs statedNoteWhere
Upper limit of the table's auto-incrementing identifier2,147,483,647 identifier valueOne table; top of the positive range of a four byte signed integer, not a row countNear: goes from -2147483648 to 2147483647
Time uploads were disrupted14 hoursAlmostNear: disrupted all uploads for almost 14 hours
Duration of the schema migration9 hoursAboutNear: the migration ended up taking about 9 hours

Records

Failure#f1

An auto-incrementing signed integer key ran out on a table with no keyspace monitoring

strava-2014-upload-outage#f1 at corpus version 26a1b3a7e3dd
Trigger

At 15:10 PDT on Tuesday, July 29 the auto-incrementing identifier of the stream metadata table, stored as a four byte signed integer, hit its upper limit of 2147483647, and insertions into the table started failing.

Section: What Happened | Near: Starting Tuesday, July 29 at approximately 15:10 PDT

How it failed

Processing an upload stores rows in that table to record which streams belong to the activity. With inserts failing, every upload to Strava failed for a period of about 35 minutes, until the team found the root cause and put the site into maintenance mode.

Section: What Happened | Near: For a period of about 35 minutes

Why defences did not hold

Normally the team would have had weeks of advance notice of this kind of issue, and it had run many such migrations before, but keyspace monitoring was not in place for this particular database.

Section: What We’re Doing

Impact

Uploads were disrupted for almost 14 hours. All uploads failed for about 35 minutes; the site was in maintenance mode until 16:10 PDT, then ran with background job processing disabled, so uploads were captured but not processed. The fix landed early on Wednesday morning, and the captured uploads had all been processed by 7:00 PDT.

Near: Starting Tuesday, July 29 at approximately 15:10 PDT

Fix

The identifier was changed from signed to unsigned by a migration on a fresh database slave, then a failover to it. An audit of all primary keys is done and more monitoring is in place. In progress: better outage communications and a site showing Strava's availability. Planned: change the remaining signed integer primary keys to unsigned ahead of need, review keyspaces routinely, and review the ability to control failing uploads, which the team says must be instant and selective.

Section: What Happened | Section: What We’re Doing

Decision#d1

Keep accepting uploads but switch off their processing while the table was fixed

strava-2014-upload-outage#d1 at corpus version 26a1b3a7e3dd
Chosen

The site was brought back with all background job processing disabled: uploads were captured but not processed until the underlying problem was fixed, and most interactive parts of the site worked.

Near: but with all background job processing disabled

Rejected

Keep the site down entirely.

Near: ranging from keeping the site down entirely

Emergency code changes.

Near: to emergency code changes to messing around

Messing around with database internals.

Near: to emergency code changes to messing around

What forced it

Inserts into the stream metadata table were failing, which blocked normal upload processing while the team worked on a repair.

Section: What Happened

Reasoning

The team felt this approach carried the least risk while still letting the site stay generally operational during the fix.

Near: carried the least amount of risk while still

Cost

All background job processing was switched off, so uploads were captured but sat unprocessed until the table was fixed. The post says the team had only an overly broad way of disabling uploads.

Near: but with all background job processing disabled | Near: we only have an overly broad way

Outcome

The site came back into production at 16:10 PDT. All captured uploads had been processed by 7:00 PDT on Wednesday.

Near: We brought the site back into production

Decision#d2

Run the key-type migration on a fresh database slave and fail over to it

strava-2014-upload-outage#d2 at corpus version 26a1b3a7e3dd
Chosen

The team brought up a fresh database slave, ran the migration from signed to unsigned integer there, and then failed over to the new slave.

Near: so we brought up a fresh database slave

What forced it

The migration had first been started in place, around the time the site came back online, but the team was not able to complete it in place.

Near: we were not able to complete the migration

Cost

Because of the amount of data in the table, the migration took about 9 hours.

Near: the migration ended up taking about 9 hours

Outcome

The problem was fixed early on Wednesday morning.

Near: The problem was fixed early Wednesday morning

Review

Extracted by
Claude (feed 26)
Human review
Not started. Status recorded on 2026-12-02.