Freebsd – uWSGI touch-reload feature not working with 100% CPU

cpu-usagefreebsdjailuwsgi

On my development box, I have configured uWSGI to reload every time a file gets touched (using the –touch-reload command line argument).
When I specify a non-existent file, I get a warning in the uWSGI logs. If I specify an existing file (say, /data/reload.uwsgi), I get nothing in the logs, meaning the settings might be OK.

Here's the problem: whenever I touch /data/reload.uwsgi, uWSGI doesn't reload. Logs don't show anything special (browsing the sources show I should get some kind of acknowledgment that the monitored file has been touched).

There is one thing though: all uwsgi processes start taking all available CPU power, until I stop the service.

uWSGI still works, but with the "old" Python code, not the reloaded one.

What am I missing? Is this a bug or something?

Thanks in advance,

Romain


By the way I'm running uWSGI 0.9.7.2 on FreeBSD 8.2 AMD64 with Python 2.7.1. uWSGI and Python are running inside a jail.

I've tried files like /data/reload.uwsgi or /tmp/reload.uwsgi, none of them work. I even tried to chown those files to the www user (the one who's running uwsgi processes), without success.
For the record, here's the command line in /etc/rc.conf to run the uWSGI service:

uwsgi_flags="-p 2 -M -t 30 -C --pythonpath /data/app -w <APPNAME> --uid www --gid www -L -d /var/log/uwsgi.log --post-buffering 8192 --touch-reload /data/reload.uwsgi"

Best Answer

It is a bug with FreeBSD, check the latest tip, it has been fixed