Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/279.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python django服务器忽略POST请求_Python_Django_Thread Safety_Tastypie - Fatal编程技术网

Python django服务器忽略POST请求

Python django服务器忽略POST请求,python,django,thread-safety,tastypie,Python,Django,Thread Safety,Tastypie,这真是奇怪的行为。当我多次向django发出POST请求时,django突然开始忽略它们。我可以在firebug中看到,但调试服务器没有显示任何内容。重新启动服务器没有帮助。更重要的是,当发生这种情况时,当我尝试重新启动服务器时,我总是得到: Error: That port is already in use. 重新启动整个机器有帮助 我想这可能与 Exception AttributeError: AttributeError("'_DummyThread' object has no a

这真是奇怪的行为。当我多次向django发出POST请求时,django突然开始忽略它们。我可以在firebug中看到,但调试服务器没有显示任何内容。重新启动服务器没有帮助。更重要的是,当发生这种情况时,当我尝试重新启动服务器时,我总是得到:

Error: That port is already in use.
重新启动整个机器有帮助

我想这可能与

Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
描述

我仍然有同样的问题。 我不知道如何诊断问题的根源

也许这会有帮助:

OS: ubuntu 12.04 LTS
Processor: Intel® Core™ i7-2720QM CPU @ 2.20GHz × 4 
Python 2.7.3
Django 1.4.1

任何帮助都将不胜感激。

作为一种解决方法,您可以使用该选项禁用开发服务器中的线程使用

./manage.py runserver --nothreading

我已经遇到了,我只是删除了终端,然后重新启动它。原因是数据处理时间长,系统找不到正确的路径,这就是为什么它挂起的原因只是跟踪你的代码,可能有bug…这是开发服务器吗?是的,它是开发服务器。你如何重新启动服务器?
./manage.py runserver --nothreading