Comments (4)
I wonder if this is related: 213c9a0
Would you mind editing src/ruby_supportlib/phusion_passenger/utils.rb
and commenting out PhusionPassenger.call_event(:unhandled_exception_before_exit, e)
and see if the error goes away?
from passenger.
@bantonj Any new findings that you might share?
@CamJN We are also getting the same error in cases when the application is under heavier load and then being restarted following a restart.txt
touch.
As if there is a race condition between application unloading and web server accepting the next request.
Worker processes remain in this status indefinitely:
* PID: 550179 Sessions: 1 Processed: 312 Uptime: 37m 42s
CPU: 21% Memory : 206M Last used: 32m 44s ag
Shutting down...
Setup: Passenger Standalone v6.0.20, Amazon Linux 2023, Ruby 3.2.2, x86_64.
I have tried commenting the line in utils.rb
(line 118), but it is after line 113 highlighted in the stack trace:
App 517567 output: [ 2024-03-14 10:13:08.5795 517567/0x00007ff93bc369a0(HTTP helper worker) utils.rb ]: *** Exception IOError (stream closed in another thread) (process 517567, thread 0x00007ff93bc369a0(HTTP helper worker)):
.../passenger-6.0.20/src/ruby_supportlib/phusion_passenger/request_handler/thread_handler.rb:133:in `accept'
.../passenger-6.0.20/src/ruby_supportlib/phusion_passenger/request_handler/thread_handler.rb:133:in `accept_and_process_next_request'
.../passenger-6.0.20/src/ruby_supportlib/phusion_passenger/request_handler/thread_handler.rb:110:in `main_loop'
.../passenger-6.0.20/src/ruby_supportlib/phusion_passenger/request_handler.rb:434:in `block (2 levels) in start_threads'
.../passenger-6.0.20/src/ruby_supportlib/phusion_passenger/utils.rb:113:in `block in create_thread_and_abort_on_exception' <<<<<<<<<
.../newrelic_rpm-9.7.1/lib/new_relic/agent/tracer.rb:434:in `block (2 levels) in thread_block_with_current_transaction'
.../newrelic_rpm-9.7.1/lib/new_relic/agent/tracer.rb:357:in `capture_segment_error'
.../newrelic_rpm-9.7.1/lib/new_relic/agent/tracer.rb:433:in `block in thread_block_with_current_transaction'
from passenger.
I can reliably reproduce this with ruby 3.2.4 on macOS just by running rake test:ruby
. @FooBarWidget any idea what this is?
from passenger.
When the app process starts, it creates a server socket and multiple threads. Each thread accepts connections from that single server socket. The main thread then waits until the Passenger Core tells us to shut down.
Upon receiving the shutdown signal, the main thread first terminate all threads by calling Thread#raise
followed Thread#join
. After that, it closes the server socket.
So I don't really know why one would get a "stream closed in another thread" error from one of the threads. By the time we close the server sockets, the threads should already have terminated.
I can't reproduce the issue. Maybe someone who can, can help by increasing log level to 7.
from passenger.
Related Issues (20)
- Out of memory leads to passenger shutdown and ensuing 502 error on nginx HOT 1
- Cannot upgrade to 1.24.0-1: unmet dependencies HOT 2
- Cannot find nginx module on Amazon Linux 2023 HOT 1
- Cannot install passenger-6.0.20-1.el9.x86_64.rpm on CentOS 9 Stream with Ruby 3.3 HOT 2
- Requests intermittently result in 500, directory in /tmp not found HOT 2
- Better cooperation with Kubernetes zero-downtime restarts
- Error with Rack prevents editing rails production credentials
- params are empty upon proper form submission HOT 1
- Packaging of unmaintained dependency: http-parser HOT 2
- The passenger spawns more processes than are allocated to it
- SecurityUpdateCheck fails when using builtin engine HOT 1
- Lacking rubyext-ruby-3.2.2-x86_64-linux.tar.gz from Release 6.0.20. HOT 1
- no Phusion Passenger(R) log file configured, discarding log output HOT 11
- Unable to locate package libnginx-mod-http-passenger | bullseye HOT 1
- Unable the fetch the repo for mod_passenger HOT 12
- passenger v6.0.21, ruby 3.3.1 with apache crashing. HOT 11
- passenger 6.0.21 will not install on AlmaLinux 9 / RHEL 9 HOT 8
- Unable to Install Passenger HOT 8
- Restore support for MacOS < 10.15 HOT 1
- Estimated Release date of Ubuntu 24.04 APT repository? HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from passenger.