-
Notifications
You must be signed in to change notification settings - Fork 693
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
20.0.27 attach-daemon not responding to touching .ini file #2681
Comments
@xrmx We expect that when we change python modules that workers get reloaded when using Example of working behavior
After the update to
But the running application doesn't get the changes to the module. I can give bisecting and build uwsgiing a shot and see if I can track down the issue. |
@xrmx I tracked it down to 8f1d0e5 7206318 does not have this issue My guess is that for (i = 1; i <= uwsgi.numproc; i++) {
if (uwsgi.workers[i].pid > 0) {
waitpid(uwsgi.workers[i].pid, &waitpid_status, 0);
}
} Putting log statements around this confirms that it is waiting forever for (i = 1; i <= uwsgi.numproc; i++) {
if (uwsgi.workers[i].pid > 0) {
uwsgi_log("Waitng for uwsgi worker pid to shutdown... (pid: %d)", uwsgi.workers[i].pid);
waitpid(uwsgi.workers[i].pid, &waitpid_status, 0);
uwsgi_log("Done waiting for uwsgi worker pid to shutdown... (pid: %d)", uwsgi.workers[i].pid);
}
} |
In my case at Line 224 in 7206318
uwsgi_detach_daemons()
uwsgi_log("---> ud %s", ud->pid);
while (ud) {
Here is my uwsgi config section if it helps [uwsgi]
uwsgi-socket = 0.0.0.0:8888
http-socket = 0.0.0.0:8080
buffer-size = 16384
pidfile = ./uwsgi.pid
master = true
chdir = .
home = ./.venv
disable-sendfile = true
need-app = true
logformat = %(addr) - %(user) %(wid) [%(ltime)] "%(method) %(var.PATH_INFO) %(proto)" %(status) %(size) "%(referer)" "%(uagent)"
paste-logger = %p
# tuning configurations
enable-threads = true
vacuum = true
lazy-apps = true Add my call to
|
We could add a Line 57 in 8f1d0e5
for (i = 1; i <= uwsgi.numproc; i++) {
if (uwsgi.workers[i].pid > 0) {
kill(uwsgi.workers[i].pid, SIGINT);
waitpid(uwsgi.workers[i].pid, &waitpid_status, 0);
}
} But ill leave that up to your direction. |
The |
Can confirm. Any progress on this issue? |
Hot reloading appears to be broken in. 2.0.27. The linked GitHub issue is the same behavior that I am seeing unbit/uwsgi#2681
I can also confirm that uwsgi reload is broken since 2.0.27. Downgrading to 2.0.26 and awaiting a fix. |
Looking at the code added in 8f1d0e5, I'd move that into |
Hot reloading appears to be broken in. 2.0.27. The linked GitHub issue is the same behavior that I am seeing unbit/uwsgi#2681
I've built packages for Fedora with this patch https://src.fedoraproject.org/rpms/uwsgi/blob/rawhide/f/uwsgi-2.0.27-graceful-reload.patch which moves the |
Hot reloading appears to be broken in. 2.0.27. The linked GitHub issue is the same behavior that I am seeing unbit/uwsgi#2681
IMO this is major regression and I would suggest 2.0.27.1 bugfix release to save other users some troubles/time. |
As part of a fix for unbit#2656, commit 8f1d0e5 introduced a measure to wait for processes to finish work while reloading. The code to do this affects other logic flows was well, breaking the ability to reload uwsgi when a config file changes. This moves the code around a bit so unbit#2656 stays fixed, but reload-on-touch/change works again. Fixes unbit#2681.
* Fix reload-on-touch/change As part of a fix for unbit#2656, commit 8f1d0e5 introduced a measure to wait for processes to finish work while reloading. The code to do this affects other logic flows was well, breaking the ability to reload uwsgi when a config file changes. This moves the code around a bit so unbit#2656 stays fixed, but reload-on-touch/change works again. Fixes unbit#2681. * Apply suggestions from code review --------- Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
<= 20.0.26 we've never had an issue with a couple of attach-daemon entries in our .ini files.
Now with 20.0.27 touching the file doesn't restart the daemons. We've changed nothing.
UPDATE: Confirmed, touching an ini that used to restart python app and attach-daemon's no longer works on .27. We downgraded to .26 no problems at all.
Of course, restarting uWSGI works just fine.
The text was updated successfully, but these errors were encountered: