Django Admin Panel Content Posting Error

django, nginx, uwsgi

Solution

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.

Problem

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.`" I analysed nginx and uwsgi logs. Nginx log contains to below line. ``` 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. ``` invalid request block size: 4169 (max 4096)...skip ``` I'm using below line to deploy my site on 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 ``` [uwsgi] chdir=/home/ module=hdblog.wsgi:application master=True pidfile=/tmp/project-master.pid vacuum=True max-requests=5000 daemonize=/tmp/hdblog.log ```

Original source