This is really strange behaviour. When I issue POST request to many times django suddenly starts to ignore them all. I can see then in firebug but debug server shows nothing. Restarting server doesn't help. Even more, when I try to restart server when this happens I always get:
Error: That port is already in use.
Restarting the whole machine helps.
I thought it may be related to
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
error I'm having but event after applying workaround:
import threading
threading._DummyThread._Thread__stop = lambda x: 42
described on Understand python threading bug
I'm still having the same problem. I don't know ho to diagnose the source of the issue.
Maybe this will be helpful:
OS: ubuntu 12.04 LTS
Processor: Intel® Core™ i7-2720QM CPU @ 2.20GHz × 4
Python 2.7.3
Django 1.4.1
Any help would be appreciated.
解决方法是,可以使用--nothreading
选项禁用开发服务器中的线程。
./manage.py runserver --nothreading
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.