phusion / passenger

A fast and robust web server and application server for Ruby, Python and Node.js
https://www.phusionpassenger.com/
MIT License
4.99k stars 548 forks source link

Possible to suppress "Checking whether to disconnect long-running connections for process" in development mode especially? #2108

Open dmalan opened 6 years ago

dmalan commented 6 years ago

Question 1: What is the problem?

When developing apps using always_restart.txt, per https://www.phusionpassenger.com/library/walkthroughs/basics/ruby/reloading_code.html#tmp-always_restart-txt, it's quite helpful to rely on console output to see and diagnose problems. However, because the server is (intentionally) restarting after every request, the console becomes cluttered with lines like:

web_1    | [ N 2018-08-16 13:38:46.2819 102/T9 age/Cor/CoreMain.cpp:994 ]: Checking whether to disconnect long-running connections for process 135, application /var/www/public (development)

Those lines can be suppressed by using PassengerLogLevel of 3 (notice) instead of the default of 4 (info), per https://www.phusionpassenger.com/library/config/apache/reference/#passengerloglevel, but a value of 3 (notice) also seems to suppress stdout from the app being developed. I.e., in a Python app, you can no longer see output from, e.g., print in the console at that log level.

Would be ideal to decrease that noisiness without sacrificing ability to print to stdout.

Noisy, a la below. :)

web_1    | [ N 2018-08-16 13:38:51.3984 102/T9 age/Cor/CoreMain.cpp:994 ]: Checking whether to disconnect long-running connections for process 215, application /var/www/public (development)
web_1    | App 236 stdout: SOME OUTPUT FROM PRINT
web_1    | [ N 2018-08-16 13:38:52.2487 102/T7 age/Cor/CoreMain.cpp:994 ]: Checking whether to disconnect long-running connections for process 236, application /var/www/public (development)
web_1    | App 255 stdout: SOME OUTPUT FROM PRINT
web_1    | [ N 2018-08-16 13:38:55.7298 102/T9 age/Cor/CoreMain.cpp:994 ]: Checking whether to disconnect long-running connections for process 255, application /var/www/public (development)
web_1    | App 276 stdout: SOME OUTPUT FROM PRINT
web_1    | [ N 2018-08-16 13:38:56.6484 102/T7 age/Cor/CoreMain.cpp:994 ]: Checking whether to disconnect long-running connections for process 276, application /var/www/public (development)
touch tmp/always_restart.txt
passenger start

Question 2: Passenger version and integration mode:

open source 5.1.11 standalone

Question 3: OS or Linux distro, platform (including version):

Ubuntu 18.04, x86_64

Question 4: Passenger installation method:

[x] RubyGems, no Gemfile

Question 5: Your app's programming language (including any version managers) and framework (including versions):

ndvbd commented 2 years ago

Same issue here. How can we suppress it?

mathieujobin commented 2 years ago

I see this with a Sinatra app, latest passenger 6.