Opened 15 years ago

Last modified 14 years ago

#12007 new

djangoadmin loaddata gives odd error if it runs out of memory — at Initial Version

Reported by: chrisw Owned by: nobody
Component: Core (Serialization) Version: 1.1
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Hi All,

I tried to import a 3.2GB xml file, partly to see if Django loads the whole file into memory when it's importing and partly to see how large pg client transactions work. Whichever caused the problem, I have a fair idea that even thought the machine has 4GB of memory, the process ran out of memory.

I'd expect a MemoryError if that were the case, what I actually got was:

File "django/core/management/init.py", line 362, in execute_manager

utility.execute()

File "/django/core/management/init.py", line 303, in execute

self.fetch_command(subcommand).run_from_argv(self.argv)

File "django/core/management/base.py", line 195, in run_from_argv

self.execute(*args, options.dict)

File "django/core/management/base.py", line 222, in execute

output = self.handle(*args, options)

File "django/core/management/commands/loaddata.py", line 200, in handle

transaction.leave_transaction_management()

File "django/db/transaction.py", line 74, in leave_transaction_management

raise TransactionManagementError("This code isn't under transaction management")

django.db.transaction.TransactionManagementError: This code isn't under transaction management

cheers,

Chris

According to the ticket's flags, the next step(s) to move this issue forward are:

  • To provide a patch by sending a pull request. Claim the ticket when you start working so that someone else doesn't duplicate effort. Before sending a pull request, review your work against the patch review checklist. Check the "Has patch" flag on the ticket after sending a pull request and include a link to the pull request in the ticket comment when making that update. The usual format is: [https://github.com/django/django/pull/#### PR].

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top