django manage.py runserver hangs after second request (intermittent)

為{幸葍}努か 提交于 2019-12-08 05:38:24

问题


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.


回答1:


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:



来源:https://stackoverflow.com/questions/47362724/django-manage-py-runserver-hangs-after-second-request-intermittent

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!