passenger
passenger copied to clipboard
Passenger not shutting down gracefully.
Issue report
Question 1: What is the problem?
- What is the expected behavior?
We expect Passenger to shut down gracefully.
- What is the actual behavior?
Passenger is not shutting down gracefully. When we issue the bundle exec passenger stop command Passenger fails with
Stopping web server...bundler: failed to load command: passenger (/opt/app/vendor/bundle/ruby/2.5.0/bin/passenger)
PhusionPassenger::DaemonController::StopTimeout: Daemon 'PassengerAgent watchdog' did not exit in time
- How can we reproduce it? Please try to provide a sample application (or Virtual Machine) demonstrating the issue. Otherwise, if we can't reproduce it, we might have to ask you a number of followup questions or run certain commands to try and figure out the problem.
- Start passenger with
bundle exec passenger start - Issue
bundle exec passenger stopfrom a different terminal.
Question 2: Passenger version and integration mode:
Open Source 6.0.4 standalone
Question 3: OS or Linux distro, platform (including version):
Ubuntu 18.04.5 LTS
Question 4: Passenger installation method:
RubyGems + Gemfile
Question 5: Your app's programming language (including any version managers) and framework (including versions):
Ruby, Rails 4.2.11.1
Question 6: Are you using a PaaS and/or containerization? If so which one?
AWS EKS 1.17, Docker version 19.03.6, build 369ce74a3c
Question 7: Anything else about your setup that we should know?
Environment Variables
PASSENGER_PORT=80
PASSENGER_MAX_POOL_SIZE=10
PASSENGER_POOL_IDLE_TIME=180
PASSENGER_MAX_REQUESTS=10000
PASSENGER_LOG_FILE=/dev/stdout
PASSENGER_ENGINE=builtin
PASSENGER_DISABLE_SECURITY_UPDATE_CHECK=true
DISABLE_ANONYMOUS_TELEMETRY=true
PASSENGER_LOG_LEVEL=7
Hey there is no update for this issue yet, is the information provided not sufficient? Kindly let me know please. Thank you!
Sorry I just haven't had time to look into this yet. I'll get to it.
Okay noted @CamJN. Thank you so much for replying.
hey @CamJN apologies, would like to ask if you had time to look at this issue?
Hi I just setup a test environment of Docker running an Ubuntu 18.04.5 container with ruby 2.5.1p57, passenger 6.0.4, rails 4.2.11.1, and the environment variables you listed in your issue report.
Unfortunately running bundle exec passenger start in one terminal and then docker exec'ing into the same container to run bundle exec passenger stop from another terminal did not reproduce the issue for me. Would it be possible to provide a Dockerfile that reproduces the issue? That would be a big help.
Not sure if Github ate your comment, but if you want to share a Dockerfile via email that's fine. You can reach me at [email protected].
Hey @CamJN have shared it via email, thank you.
hey @CamJN may I ask, if we were able to reproduce the issue using the shared dockerfile ? Thank you.
Hey @CamJN would like to follow up on this.
It would be helpful if you could help us understand if this is an issue at passenger's end.
I'm currently trying to build the image, the dockerfile installs ruby 2.3 as a dependency of some apt package which i believe is interfering with the later steps.
The ruby-dev package you install in your Dockerfile is for the system ruby (2.3). You want the ruby headers for 2.5 which are already installed at /usr/local/include/ruby-2.5.0/ruby/ruby.h.
hey @CamJN would like to follow up on this.
I believe this is because of the 15 seconds default stop timeout, if the graceful shutdown takes more than 15 seconds then we will have this error raised.
Is there a way for us to increase this @CamJN ?
Not at the moment, we can change this issue into a feature request though if you like.
Yea, I think it will be great if we could do this. I would be able to contribute on this and will need your help to point me in the right direction here.
I think step one would be to just pass a higher stop timeout directly in the code, and see if that helps. If it does then we can talk about how to plumb in a new option.