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.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
mornaner's avatar
109
mornaner
asked 12 years ago
Evgeny's avatar
13.2k
Evgeny
updated 12 years ago

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 (12 years ago)

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 (12 years ago)

@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 (12 years ago)

@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 (12 years ago)
see more comments