I use uwsgi+nginx to run my django app. And encountered a serious problem. uwsgi config ini file:
[api_pro] processes=4 module=wsgi chmod-socket=1 master=1 buffer-size=65535 chdir=/home/venti/prod/webapps/ pythonpath=/home/venti/prod/ socket=/tmp/uwsgi_api_pro.sock env=DJANGO_SETTINGS_MODULE=webapps.settings_api_server As you can see, I use 4 processes because I have 4 cpu cores, But when a user upload an photo. The server will get blocked and other light requestes can not be processed, the cpu stats looks like this: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 1148 venti 20 0 994m 366m 4752 S 100 9.3 116:41.35 uwsgi 1147 venti 20 0 945m 317m 4756 S 7 8.1 6:45.96 uwsgi 1149 venti 20 0 1064m 422m 4760 S 1 10.7 8:49.01 uwsgi 1150 venti 20 0 1003m 326m 4756 S 0 8.3 7:18.85 uwsgi looks like only one process is busy for uploading the file and other processes are not processing the requestes. How can I resolve this? My app has a lot of upload requests, Thanks a lot.
_______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
