Re: [flask] Configuring number of process and threads for wsgi daemon process
- From:
- danjac354@gmail.com
- Date:
- 2010-10-25 @ 07:39
If it takes that long to execute I'd consider moving the script to a
cronjob or a message queue such as Celery:
http://github.com/ask/flask-celery
On 25 October 2010 06:35, Sujan Shakya <suzan.shakya@gmail.com> wrote:
> Hi,
>
> I am using flask to trigger a backend script. The backend script uses takes
> about 13 sec to run and return the value to flask which is returned as
> response object.
> Now, I am running flask in wsgi daemon process. When the url is triggered
> from single browser client, the response takes exactly 13 sec. However, when
> 2 clients
> run simultaneously, 1st client takes 13 sec and 2nd client takes 26 sec.
>
> I have tried this with "processes=2 threads=1" and with default value which
> is "threads=15". In both cases, the above behavior is same.
> So, how should wsgi be configured ?
> Any help is much appreciated.
>
>
> Thank you
> Sujan Shakya
> Nepal
>
>
>