小编Cha*_*ert的帖子

Apache/wsgi“脚本在返回标头之前超时”

我有一个自定义的 Django 应用程序,大约每 5,000 个请求就会变得无响应。在 apache 日志中,我看到以下内容:

Apr 13 11:45:07 www3 apache2[27590]: **successful view render here**
...
Apr 13 11:47:11 www3 apache2[24032]: [error] server is within MinSpareThreads of MaxClients, consider raising the MaxClients setting
Apr 13 11:47:43 www3 apache2[24032]: [error] server reached MaxClients setting, consider raising the MaxClients setting
...
Apr 13 11:50:34 www3 apache2[27617]: [error] [client 10.177.0.204] Script timed out before returning headers: django.wsgi
(repeated 100 times, exactly)
Run Code Online (Sandbox Code Playgroud)

我相信我正在使用以下配置运行 WSGI 2.6 (/usr/lib/apache2/modules/mod_wsgi.so-2.6):

阿帕奇配置

WSGIDaemonProcess site-1 user=django group=django threads=50
WSGIProcessGroup …
Run Code Online (Sandbox Code Playgroud)

django wsgi

8
推荐指数
1
解决办法
8524
查看次数

标签 统计

django ×1

wsgi ×1