Abort long running websockets on shutdown with nginx standalone does not behave as expected #2211
Question 1: What is the problem?
On shutdown of passenger in combination with nginx standalone with open websockets, these websocket connections should be closed. So that nginx shuts down.
Nginx does not shut down when websocket connections are still open. The default configuration (https://www.phusionpassenger.com/docs/references/config_reference/nginx/#passenger_abort_websockets_on_process_shutdown) says it should abort the websocket connections. This does not happen.
Since nginx gets a graceful kill command Nginx will wait until web sockets are finished.
Using Rails 5.2 with actioncable on passenger standalone. Open a websocket connection and stop passenger. Keep track of the open processes.
Be as detailed as possible in your descriptions, include any logs and stack traces (don't just cut/paste the error, provide some logging before that too).
When we stop the websocket client ourselves (close the browser window)
(if you are requesting a feature instead of reporting an issue, describe here what you have in mind and how it would help you)
Question 2: Passenger version and integration mode:
nginx/1.14.0 Phusion_Passenger/5.3.6 Standalone
Question 3: OS or Linux distro, platform (including version):
Linux 4.9.0-6-amd64 #1 SMP Debian 4.9.88-1+deb9u1 (2018-05-07) x86_64
Question 4: Passenger installation method:
Question 5: Your app's programming language (including any version managers) and framework (including versions):
Ruby 2.5.5, Rails 5.2.3
Question 6: Are you using a PaaS and/or containerization? If so which one?
The text was updated successfully, but these errors were encountered:
Have you tried this config option? The default is different in standalone than nginx: https://www.phusionpassenger.com/docs/references/config_reference/standalone/#--no-abort-websockets-on-process-shutdown-abort_websockets_on_process_shutdown
@CamJN I can reproduce it too. The problem is as follows:
W.r.t. solutions, we have a few alternatives: