passenger icon indicating copy to clipboard operation
passenger copied to clipboard

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

Open dmalan opened this issue 6 years ago • 2 comments

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.

  • What is the expected behavior?

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

  • What is the actual behavior?

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)
  • How can we reproduce it?
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):

dmalan avatar Aug 16 '18 13:08 dmalan

Same issue here. How can we suppress it?

ndvbd avatar Feb 28 '22 16:02 ndvbd

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

mathieujobin avatar Jun 28 '22 05:06 mathieujobin