简体   繁体   English

Django服务器无响应

[英]Django server don't respond

After execute ./manage.py runserver which works rather fine, sometimes server doesn't respond, such as it would be turned off. 执行./manage.py runserver运行服务器后,它运行良好,有时服务器不响应,例如将其关闭。

I tried google-chrome, opera or just ping it under Arch Linux. 我尝试使用google-chrome,opera或只是在Arch Linux下对其进行ping操作。

My Django dev server was responding slowly, and I couldn't figure it out. 我的Django开发服务器响应缓慢,我无法弄清楚。 But once I started using Mac OS X's built-in Apache instead of django.views.static.serve to server my static files, everything started responding quickly again. 但是,一旦我开始使用Mac OS X的内置Apache而不是django.views.static.serve来存储我的静态文件,一切便开始迅速响应。

Since you're using Linux, maybe you can set up Apache to serve your static files and see if that works? 由于您使用的是Linux,也许您可​​以设置Apache来提供您的静态文件,看看是否可行?

I think my slowness was due to having either too many files or a file that was too large being served by django.views.static.serve that caused the issue. 我认为我的速度缓慢是由于文件太多或django.views.static.serve提供的文件太大而引起的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM