manage.py dumpdata json storage problem

262 views
Skip to first unread message

Ricardo L. Dani

unread,
Aug 1, 2011, 8:32:18 AM8/1/11
to django...@googlegroups.com
Hello django-users,

I'm having problems trying to serialize the data of a postgresql db of my business application (lots of lots of data)

Using the command:

./manage.py dumpdata > data.json

But, the execution of this command takes a long time and the ram and swap of the computer reachs the limit causing a exeption:

django.db.utils.DatabaseError: out of memory for query result

The question is, somewone knows a way to this command write in the data.json directly or in demand? I believe this is the problem and solution, am I correct?

graciously,

-- 
Ricardo Lapa Dani

Ricardo L. Dani

unread,
Aug 1, 2011, 9:36:01 AM8/1/11
to django...@googlegroups.com
I found the ticket to this issue (with patchs)

--
Ricardo Lapa Dani

Subhranath Chunder

unread,
Aug 1, 2011, 4:42:40 PM8/1/11
to django...@googlegroups.com
You would probably have to wait until the django backend for postgres is modified not to fetch all the records at one go.

As for now, I guess you should go ahead with writing custom serializers which specifically queries the db records in chunks.

Sent from my iPad 2
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Reply all
Reply to author
Forward
0 new messages