> 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.
This is a common wrong assumption, the number of cpus is unrelated with the number of processes needed for your app. Just as an example, apache by default will spawn upto 256 processes and tomcat starts with dozens of threads. Each app has different requirements. Tools like uwsgitop or services like newrelic can help in finding the best values. > The server will get blocked and other light requestes can not be > processed, this looks very strange, are you sure you are not trying from the same browser ? In such a case it would not be able to send datas to the webserver (you can try using a second browser or tools like curl) -- Roberto De Ioris http://unbit.it _______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
