DantheMan
DantheMan

Reputation: 7417

django. I cannot drop objects

I have version 1.2.3 of django configured with postgres, and I just went to do a manage.py reset app and it just kept waiting and waiting and waiting. So I ctrl+z it to kill it.

So i went into the built in admin interface and tried to delete some objects. When I selected to delete an object, the page would load and load and load until it timed out and never deleted the object. Same thing if I made a view to delete an object; it will just time out. This happens on all my objects. The only thing I can think of that I changed between my last version of my app and this version is I added several manytomanyfields and a self referential foreign key.

It never errors out or anything. the timeout happens at my nginx server and is set to 2 min which obviously should be long enough to delete one object, so I never get a django error screen. It only has about 10 objects total in it so far that are related to this app.

I can still create objects and everything, it is just that I have found no way to delete all the objects related to my app.

Any thoughts? I know I can just nuke the db and create a new one and the problem would be theoretically solved, but I would like to try and figure out what happened so I can avoid this problem in the future.

Upvotes: 1

Views: 199

Answers (1)

maersu
maersu

Reputation: 3282

Maybe there is still open a Database Transaction with exclusive lock on a object. Try to restart the Database Deamon.

Upvotes: 4

Related Questions