I've tried setting enable-threads to true in addition to setting various
values for "threads" (1, 2, and 4).

No change. I still get stuck processes.

The vast majority of these stuck processes end up being a "heartbeat" page
(because it is requested most often of all the pages).

This page randomly picks one of 4 models and does a Model.objects.count()
and returns a 200 status if the count is greater than -1, 404 otherwise.

I can try and capture gdb output, but I am not sure what I am looking for.


On Fri, Mar 13, 2015 at 9:30 AM, Roberto De Ioris <[email protected]> wrote:

>
> > Every couple of minutes, I end up with a worker that gets stuck busy.
> > strace shows that this worker is blocked by:
> >
> > futex(0x4dc7d08, FUTEX_WAIT_PRIVATE, 2, NULL <unfinished ...>
> >
> > Harakiri will ultimately kill the worker after 300 seconds as configured
> > in
> > the ini file.
> >
> > Any thoughts on how I can go about tracking down the cause of this issue?
> >
> >
> > Configuration info follows...
> >
> > This happens on multiple AWS instances, all configured the same way:
> >
> > Linux hostname 3.2.0-4-amd64 #1 SMP Debian 3.2.60-1+deb7u3 x86_64
> > GNU/Linux
> >
> > I am running the 2.0.9 version of uwsgi (installed via pip).
> >
> > My ini file is:
> >
> > [uwsgi]
> > chdir = /opt/site/project/
> > master = true
> > wsgi-file = /opt/site/project/app/wsgi.py
> > processes = 10
> > stats = 127.0.0.1:9191
> > socket = 127.0.0.1:3031
> > uid = www-data
> > gid = www-data
> > vacuum = True
> > enable-threads = false
> > env = DJANGO_SETTINGS_MODULE=app.settings
> > env = ENVIRONMENT=project
> > home = /opt/site/project/
> > virtualenv = /opt/site/project/.venv/
> > daemonize = /var/log/uwsgi.log
> > single-interpreter = true
> > maxrequests = 200
> > reload-on-as = 256
> > idle = 300
> > harakiri = 300
> >
> >
>
>
> futex is the main linux locking primitive. Probably some part of your code
> uses threads so it needs to manage locking/GIL. Try setting enable-threads
> to true
>
> --
> Roberto De Ioris
> http://unbit.com
> _______________________________________________
> uWSGI mailing list
> [email protected]
> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
>
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to