django manage.py runserver 在第二次请求后挂起(间歇性) [英] django manage.py runserver hangs after second request (intermittent)
问题描述
我的 Django 1.11 应用程序(使用 runserver)在多次请求后挂起.无论是通过 Chrome、Postman 还是 curl 访问都没有关系.
当它挂起时,即使是 Ctrl+C 也无法关闭它.必须杀死 python.exe 进程.
我尝试调试它,但是当 Django 卡住时,无法暂停 Python 以获取线程/堆栈.
由于 Avast 防病毒软件的 Behavior Shield,这实际上发生在我身上.
如果你用谷歌搜索,你会发现 Avast 长期以来一直讨厌"Python:
My Django 1.11 app (using runserver) hangs after several requests. It doesn't matter whether it's accessed by Chrome, Postman, or curl.
When it hangs, not even Ctrl+C can close it. The python.exe process must be killed.
I tried debugging it but when Django is stuck, Python cannot be paused to get the threads/stack.
This actually happens to me due to Avast antivirus's Behavior Shield.
If you google it you find out that Avast has a long history of "hating" Python: https://www.google.co.id/search?q=avast+python
Solution: Avast > Settings > Components > Behavior Shield > Exclusions, then add your python.exe or your virtualenv's python.exe there:
这篇关于django manage.py runserver 在第二次请求后挂起(间歇性)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!