You have to increase the number of workers (or threads).
Cherokee is a streaming server so it will pass POST data to uWSGI as
soon as they arrive leaving it blocked for all the upload cycle.
Add -p <n> (ncpu*2 is a good number to start with) or if you are using a
0.9.7.x release you can use threads with --threads <n>
--
Roberto De Ioris
http://unbit.it
This is a normal deploy problem (not related to uWSGI). This is why
async/evented is so loved this days :) If your machine can tolerate 1000
processes (but sorry i do not think so) use this, but every process is a
full copy of your app stack so memory will be devoured.
If you have so many users doing uploads, you can try threads (they are
cheaper than processes) but the best solution would be Cherokee disabiling
streaming uploads to pass the request to uWSGI only when the upload is
done.
I will talk to the Cherokee lead developer to reintroduce this feature
(before 1 point releases Cherokee worked that way)
No using a streaming upload webserver will solve your problem
Move to nginx, this will solve your specific problem, and use
X-Accel-Redirect (this is the equivalent of X-Sendfile in nginx) for all
the downloads.
>
> On 27 ���, 11:46, "Roberto De Ioris" <robe...@unbit.it> wrote:
>> > Thx, <processes>4</processes> helps.
>> > But so if 4 users go to page with image, or upload some file, all will
>> > be crashed again.
>> > Is it a good to have <processes>1000</processes>?
>> > Sounds bad
>>
>> This is a normal deploy problem (not related to uWSGI). This is why
>> async/evented is so loved this days :) If your machine can tolerate 1000
>> processes (but sorry i do not think so) use this, but every process is a
>> full copy of your app stack so memory will be devoured.
>>
>> If you have so many users doing uploads, you can try threads (they are
>> cheaper than processes) but the best solution would be Cherokee
>> disabiling
>> streaming uploads to pass the request to uWSGI only when the upload is
>> done.
>>
>> I will talk to the Cherokee lead developer to reintroduce this feature
>> (before 1 point releases Cherokee worked that way)
>>
>> --
>> Roberto De Iorishttp://unbit.it
>