Django migrations fail on a table with a large JSON column
· Aucune vue
The migration locks the table for several minutes in production. How can I avoid downtime?
Démonstration : données fictives.Version de démonstration. Les données sont fictives.
· Aucune vue
The migration locks the table for several minutes in production. How can I avoid downtime?
Measure before optimizing. A quick profile usually shows that most of the time is spent in one call. Fix that one first.
Start by reproducing it with a minimal example. Most of the time the cause becomes obvious once you strip away the unrelated code.
git bisect startWe hit this in production. What worked: add an idempotency key, store it with a unique constraint, and silently ignore duplicates.
Partagez une piste claire et vérifiable.
Votre brouillon est conservé sur cet appareil.