开发者

django. I cannot drop objects

开发者 https://www.devze.com 2023-02-01 09:54 出处:网络
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.

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 obj开发者_运维技巧ect, 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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号