TransactionManagementError when importing users from SE dump

When i run python manage.py load_stackexchange data.zip the import process starts and after a while, when is importing users I get this error:

Traceback (most recent call last):
  File "manage.py", line 11, in <module>
    execute_manager(settings)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 43  8, in execute_manager
    utility.execute()
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 37  9, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 191, i  n run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 220, i  n execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python2.7/dist-packages/django/db/transaction.py", line 219, in inne  r
    self.__exit__(*sys.exc_info())
  File "/usr/local/lib/python2.7/dist-packages/django/db/transaction.py", line 207, in __ex  it__
    self.exiting(exc_value, self.using)
  File "/usr/local/lib/python2.7/dist-packages/django/db/transaction.py", line 302, in exit  ing
    leave_transaction_management(using=using)
  File "/usr/local/lib/python2.7/dist-packages/django/db/transaction.py", line 56, in leave  _transaction_management
    connection.leave_transaction_management()
  File "/usr/local/lib/python2.7/dist-packages/django/db/backends/__init__.py", line 115, i  n leave_transaction_management
    raise TransactionManagementError("Transaction managed block ended with "
django.db.transaction.TransactionManagementError: Transaction managed block ended with pend  ing COMMIT/ROLLBACK

I've tried multiple times and always get the same error.

mornaner's avatar
109
mornaner
asked 2012-11-12 09:49:14 -0600
Evgeny's avatar
13.2k
Evgeny
updated 2012-11-12 09:57:16 -0600
edit flag offensive 0 remove flag close merge delete

Comments

Thank you. I will look into SE import in a few hours and then post an answer. This may be due to our more recent changes in the code, or a previously undiscovered issue that shows with your data.

Evgeny's avatar Evgeny (2012-11-12 09:58:38 -0600) edit

I have fixed some errors (in the repository) and was able to import a small dump, will try on a bigger one tomorrow.

Evgeny's avatar Evgeny (2012-11-12 22:13:47 -0600) edit

@Evgeny I have tried the import multiple times today after updating and the error is still showing. It seems to be random, two times happened when the progress was 0.x% and once, specially hurting, the progress was 99.33%

mornaner's avatar mornaner (2012-11-14 11:50:50 -0600) edit

@mornaner, it is possible that you are running out of memory. The process may grow to 200-300 MB possibly bigger with the larger data sets. Linux may be evicting processes that want to use too much RAM.

Evgeny's avatar Evgeny (2012-11-14 11:54:36 -0600) edit
add a comment see more comments