While I was adding content for my django web site on admin panel,I get the error.After I added 10-15 content,site give the this error. "The page you are looking for is temporarily unavailable.
"
当我在管理面板上为django web站点添加内容时,我得到了错误。在我添加了10-15个内容后,站点给出了这个错误。“您正在查找的页面暂时不可用。”
I analysed nginx and uwsgi logs.
我分析了nginx和uwsgi日志。
Nginx log contains to below line.
Nginx日志包含到下面一行。
2012/06/02 22:02:53 [error] 5203#0: *602 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 92.10.214.1, server: server.com, request: "POST /admin/hdduyuru/duyurular/add/ HTTP/1.1", upstream: "uwsgi://127.0.0.1:1235", host: "127.0.0.1", referrer: "http://127.0.0.1/admin/hdduyuru/duyurular/add/"
And uwsgi log contains to below line.
uwsgi日志包含到下面一行。
invalid request block size: 4169 (max 4096)...skip
I'm using below line to deploy my site on uwsgi+nginx
我使用下面的线来部署我的网站uwsgi+nginx。
/usr/bin/uwsgi --socket 127.0.0.1:1245 --master --workers 5 --harakiri 30 --disable-logging --daemonize /tmp/daemonize.log --pidfile /tmp/pidfile.txt --vacuum --gid 500 --uid 500 --ini /home/uwsgi.ini
/home/uwsgi.in
/home/uwsgi.in
[uwsgi]
chdir=/home/
module=hdblog.wsgi:application
master=True
pidfile=/tmp/project-master.pid
vacuum=True
max-requests=5000
daemonize=/tmp/hdblog.log
1 个解决方案
#1
24
Looks like the request headers may have exceeded the default uwsgi maximum buffer size of 4k. Try increasing the buffer size by adding buffer-size=32768
to your uwsgi.ini
file.
看起来请求头可能已经超过默认的uwsgi最大缓冲区大小4k。尝试通过向uwsgi添加缓冲区大小=32768来增加缓冲区大小。ini文件。
#1
24
Looks like the request headers may have exceeded the default uwsgi maximum buffer size of 4k. Try increasing the buffer size by adding buffer-size=32768
to your uwsgi.ini
file.
看起来请求头可能已经超过默认的uwsgi最大缓冲区大小4k。尝试通过向uwsgi添加缓冲区大小=32768来增加缓冲区大小。ini文件。