You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Puma problems: "pid is not listening for messages", "process already being traced?, "Address already in use - bind(2) for /tmp/rbtrace-47445.sock (Errno::EADDRINUSE)"
#97
Open
bensheldon opened this issue
May 16, 2024
· 2 comments
Apologies that this is slightly duplicative of #56, #87, but I figured I would share all of the issues that I'm experiencing when using rbtrace specifically with Puma. Maybe fixed by #86 but I'm unable to successfully build that (probably a me problem).
When booting Puma in single mode (e.g. no separate workers, one process), and in Development mode. All of these are using the command:
rbtrace --pid=<PID> --timeout=60 --eval true
First attempt:
I try to connect via rbtrace before Puma receives its first web request, I receive Error: argument --pid (pid is not listening for messages, did you require "rbtrace").
Then, if I make a web request, and then connect via rbtrace I get: Error: argument --pid (process already being traced?)
Then, if I connect via rbtrace and then immediately reload the browser multiple times, I get: *** process 54112 is already being traced (54398 != 54484)
And then I try to connect again and get
/Users/bensheldon/.rbenv/versions/3.3.1/lib/ruby/gems/3.3.0/gems/rbtrace-0.5.1/lib/rbtrace/rbtracer.rb:48:in `bind': Address already in use - bind(2) for /tmp/rbtrace-56790.sock (Errno::EADDRINUSE)
from /Users/bensheldon/.rbenv/versions/3.3.1/lib/ruby/gems/3.3.0/gems/rbtrace-0.5.1/lib/rbtrace/rbtracer.rb:48:in `initialize'
from /Users/bensheldon/.rbenv/versions/3.3.1/lib/ruby/gems/3.3.0/gems/rbtrace-0.5.1/lib/rbtrace/cli.rb:428:in `new'
from /Users/bensheldon/.rbenv/versions/3.3.1/lib/ruby/gems/3.3.0/gems/rbtrace-0.5.1/lib/rbtrace/cli.rb:428:in `run'
from /Users/bensheldon/.rbenv/versions/3.3.1/lib/ruby/gems/3.3.0/gems/rbtrace-0.5.1/bin/rbtrace:5:in `<top (required)>'
from /Users/bensheldon/.rbenv/versions/3.3.1/bin/rbtrace:25:in `load'
from /Users/bensheldon/.rbenv/versions/3.3.1/bin/rbtrace:25:in `<main>'
At this point, there is no receovery without restarting the process.
Trying a second time:
I first make a web request to Puma after starting the process
I run try to connect with rbtrace while also hammering Browser Refresh and get Error: argument --pid (pid is not listening for messages, did you require "rbtrace"`).
I try again to connect, while also hammering Browser Refresh... *** attached to process 54900 🎉
....it hangs for that 60 second timeout.... *** timed out waiting for eval response☹️
Trying a third time:
In this case, I try to connect while also continuously hammering Browser Refresh:
*** attached to process 54900
>> true
=> true
*** detached from process 54900
🎉 🎉 🎉
Observation: For reasons I don't know, the Puma process requires continual web requests to allow it to be connected to, and to subsequently complete and detach. Otherwise it gets left in a bad state that prevents further connections without restarting the process.
The text was updated successfully, but these errors were encountered:
We're seeing the exact same problems - As if rbtracr cannot Connect while puma thread is sleeping/awaiting requests.
When running with ab while tracing, it worked 99% of the time.
Maybe Multi-process/multi-threaded only - I don't recall seeing the same issue locally.
For context - this was inside a container in kubernetes. Not sure it matters.
Apologies that this is slightly duplicative of #56, #87, but I figured I would share all of the issues that I'm experiencing when using
rbtrace
specifically with Puma. Maybe fixed by #86 but I'm unable to successfully build that (probably a me problem).When booting Puma in
single mode
(e.g. no separate workers, one process), and in Development mode. All of these are using the command:rbtrace --pid=<PID> --timeout=60 --eval true
First attempt:
rbtrace
before Puma receives its first web request, I receiveError: argument --pid (pid is not listening for messages, did you
require "rbtrace").
rbtrace
I get:Error: argument --pid (process already being traced?)
rbtrace
and then immediately reload the browser multiple times, I get:*** process 54112 is already being traced (54398 != 54484)
Trying a second time:
rbtrace
while also hammering Browser Refresh and getError: argument --pid (pid is not listening for messages, did you
require "rbtrace"`).*** attached to process 54900
🎉*** timed out waiting for eval response
Trying a third time:
In this case, I try to connect while also continuously hammering Browser Refresh:
🎉 🎉 🎉
Observation: For reasons I don't know, the Puma process requires continual web requests to allow it to be connected to, and to subsequently complete and detach. Otherwise it gets left in a bad state that prevents further connections without restarting the process.
The text was updated successfully, but these errors were encountered: