Instead of sending a TERM to Starman, we should send a QUIT, as that will complete any current requests before shutting down. It should make for a better user experience.
Created attachment 139036 [details] [review] Bug 31348: Make koha-plack stop gracefully 0. Apply patch 1. cp /usr/sbin/koha-plack /usr/sbin/koha-plack.bak 2. cp debian/scripts/koha-plack /usr/sbin/koha-plack 3. Now at roughly the same time do the following two actions: 3a. Go to http://localhost:8081/cgi-bin/koha/about.pl 3b. koha-plack --stop kohadev 4. Note that the HTTP request completes 5. Click on "Home" 6. Note that the error is "Service Unavailable" rather than "Proxy Error", which would've occurred with an interrupted HTTP request/response
Same for debian/scripts/koha-z3950-responder?
(In reply to Jonathan Druart from comment #2) > Same for debian/scripts/koha-z3950-responder? I don't think so. The QUIT signal is specific to Starman. The Z3950 responder might have signal handling somewhere but I didn't notice anything at a glance.
Created attachment 139525 [details] [review] Bug 31348: Make koha-plack stop gracefully 0. Apply patch 1. cp /usr/sbin/koha-plack /usr/sbin/koha-plack.bak 2. cp debian/scripts/koha-plack /usr/sbin/koha-plack 3. Now at roughly the same time do the following two actions: 3a. Go to http://localhost:8081/cgi-bin/koha/about.pl 3b. koha-plack --stop kohadev 4. Note that the HTTP request completes 5. Click on "Home" 6. Note that the error is "Service Unavailable" rather than "Proxy Error", which would've occurred with an interrupted HTTP request/response Signed-off-by: David Nind <david@davidnind.com>
Created attachment 139566 [details] [review] Bug 31348: Make koha-plack stop gracefully 0. Apply patch 1. cp /usr/sbin/koha-plack /usr/sbin/koha-plack.bak 2. cp debian/scripts/koha-plack /usr/sbin/koha-plack 3. Now at roughly the same time do the following two actions: 3a. Go to http://localhost:8081/cgi-bin/koha/about.pl 3b. koha-plack --stop kohadev 4. Note that the HTTP request completes 5. Click on "Home" 6. Note that the error is "Service Unavailable" rather than "Proxy Error", which would've occurred with an interrupted HTTP request/response Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Why did you wait so long with this patch, David ? :) I would be tempted to classify it as a bug btw. And backport? Tomas: What do you think?
Pushed to master for 22.11. Nice work everyone, thanks!
(In reply to Marcel de Rooy from comment #6) > Why did you wait so long with this patch, David ? :) > I would be tempted to classify it as a bug btw. And backport? > > Tomas: What do you think? Lets do it.
Backported to 22.05.x for upcoming 22.05.06 release.
Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed. Nothing to document it seems, marking resolved.
Thanks! Pushed to 21.11 for 21.11.12