Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Puma::Single#stop raises undefined method `stop' for nil:NilClass #1523

Closed
grosser opened this issue Mar 1, 2018 · 10 comments
Closed

Puma::Single#stop raises undefined method `stop' for nil:NilClass #1523

grosser opened this issue Mar 1, 2018 · 10 comments
Labels

Comments

@grosser
Copy link
Contributor

grosser commented Mar 1, 2018

idk when or how this happens ... just found that in our error reporter ... also not sure how bad that is, but smells like something is going wrong :(

Undefined method `stop' for nil:NilClass
--
ruby/2.5.0/gems/puma-3.8.2/lib/puma/single.rb:18
ruby/2.5.0/gems/puma-3.8.2/lib/puma/single.rb:18 in stop
ruby/2.5.0/gems/puma-3.8.2/lib/puma/launcher.rb:146 in stop
ruby/2.5.0/gems/puma-3.8.2/lib/puma/launcher.rb:384 in block in setup_signals

patching it with this in the hope it makes some strange hang-on-restart errors we saw go away ...

Puma::Single.prepend(Module.new do
  def stop
    super
  rescue NoMethodError
  end
end)
@b10s
Copy link

b10s commented Mar 28, 2018

Have the same error with the next snippet

@chrisvel
Copy link

Same error, tried a small app in Arch and BSD. I don't get the pattern but it seems it randomly fails.

@aditya01933
Copy link

aditya01933 commented Aug 7, 2018

We are facing this issue with puma 3.12.0:


Log output:
--
  | Puma starting in single mode...
  | * Version 3.12.0 (ruby 2.3.5-p376), codename: Llamas in Pajamas
  | * Min threads: 1, max threads: 10
  | * Environment: production
  | ! Unable to load application: NoMethodError: undefined method `stop' for nil:NilClass
  | /usr/local/bundle/gems/puma-3.12.0/lib/puma/single.rb:27:in `stop': undefined method `stop' for nil:NilClass (NoMethodError)
  | from /usr/local/bundle/gems/puma-3.12.0/lib/puma/launcher.rb:147:in `stop'
  | from /usr/local/bundle/gems/puma-3.12.0/lib/puma/launcher.rb:412:in `block in setup_signals'
  | from /usr/local/bundle/gems/json-1.8.3/lib/json/common.rb:155:in `parse'


@grosser @b10s @chrisvel Have anyone of you found the solution of the issue?

@baelter
Copy link
Contributor

baelter commented Apr 5, 2019

Still getting this in 3.12.1 after SIGTERM from rerun

11:26:42 [rerun] Rerun (4998) running my-app (20852)
11:26:42 web.1     | started with pid 20856
11:26:43 web.1     | Puma starting in single mode...
11:26:43 web.1     | * Version 3.12.1 (ruby 2.5.3-p105), codename: Llamas in Pajamas
11:26:43 web.1     | * Min threads: 1, max threads: 64
11:26:43 web.1     | * Environment: development
11:26:44 [rerun] Change detected: 1 modified: Gemfile.lock
11:26:44 system    | SIGTERM received, starting shutdown
11:26:44 system    | sending SIGTERM to all processes
11:26:44 web.1     | - Gracefully stopping, waiting for requests to finish
11:26:44 web.1     | ! Unable to load application: NoMethodError: undefined method `stop' for nil:NilClass
11:26:44 web.1     | /Users/anders/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/puma-3.12.1/lib/puma/single.rb:39:in `stop_blocked': undefined method `stop' for nil:NilClass (NoMethodError)
11:26:44 web.1     | 	from /Users/anders/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/puma-3.12.1/lib/puma/launcher.rb:294:in `graceful_stop'
11:26:44 web.1     | 	from /Users/anders/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/puma-3.12.1/lib/puma/launcher.rb:398:in `block in setup_signals'```

@dentarg
Copy link
Member

dentarg commented Apr 5, 2019

@baelter the fix hasn't been released yet, 3.12.1 is the code from early January: #1758 (comment)

@rgaufman
Copy link

When is a release planned?

@dentarg
Copy link
Member

dentarg commented Apr 23, 2019

@rgaufman #1731 (comment) talks about a release "Ideally targeting RailsConf timeframe" @schneems or @nateberkopec might know more?

@nateberkopec
Copy link
Member

Richard's having some health issues which may push back this release abit. I'm trying to get caught up now.

@AkankshaSh
Copy link

Still facing this issue with puma-3.12.1

@schneems
Copy link
Contributor

schneems commented Feb 7, 2023

I’m not sure what you’re hoping to get by commenting on an issue closed for 4 years using a version way behind the latest.

if you’ve got a reproducible bug using the latest puma please open a new issue with a reproduction

@puma puma locked as resolved and limited conversation to collaborators Feb 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

10 participants