Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Document how to handle stuck migrations

  • Loading branch information...
commit 6f7289795e45ff170902ff1d2a90625ee5aa1ac6 1 parent 827103b
@slinkp slinkp authored
Showing with 12 additions and 0 deletions.
  1. +12 −0 docs/main/maintenance.rst
View
12 docs/main/maintenance.rst
@@ -42,6 +42,18 @@ located under the various app directories, notably
``ebpub/ebpub/db/migrations/`` to see what the existing migration
scripts look like.
+.. admonition:: If a migration gets stuck...
+
+ If you run ``django-admin.py migrate`` and it seems to hang -- just
+ sitting there indefinitely -- this typically means some other code is
+ trying to write to the database, but the migration needs an exlusive
+ lock to alter some tables, so it waits "forever" for those other
+ scripts to go away. (See
+ http://south.aeracode.org/wiki/FAQ#ImusingPostgreSQLandmigrationsjusthangindefinitely
+ ). Typically these will be :doc:`scraper <running_scrapers>` scripts. To fix it, either
+ restart the database, or ``kill`` all the other processes that are
+ writing to the database. The migration should then finish with no trouble.
+
.. _moderation:
Moderating User-Submitted Content
Please sign in to comment.
Something went wrong with that request. Please try again.