puma-dev: touch tmp/restart.txt always leads to connection refused
I haven’t been able to use touch/tmp/restart.txt
with the latest release…
Here’s what happens in the logs:
! App 'billing.tito' booted
! Killing 'billing.tito' (24599)
2016/08/10 12:13:08 http: proxy error: dial unix /Users/paulcampbell/.puma-dev/billing.tito/tmp/puma-dev-24598.sock: connect: connection refused
In the browser, the viewport just goes blank white.
unload/reload via launchctl works and is fast enough for me for now.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 9
- Comments: 33 (14 by maintainers)
I am using
touch tmp/restart.txt && rm tmp/restart.txt
it’s a bit wonky but it works.As a follow-up, the only way I can get puma working again after this happens is like so:
@evanphx Can you please reopen this? It is definitely still happening with the latest version (v0.12) on High Sierra (10.13.6). I am also seeing the “proxy error” when using
touch
, and a clean shutdown when usingrm
. Excerpts from my logs:touch tmp/restart.txt
, I consistently get:then when I try to hit the app again, I get the “connection refused” error:
rm tmp/restart.txt
(no need to do atouch
first):and then the app reboots properly.
Notice how when using
rm
, the app shutdown gracefully, but withtouch
, it looks like some sort of error is triggered, puma-dev fails to shutdown the app properly and ends up in a broken state.In case it helps:
I am seeing exactly the same issue, and can confirm that the @firedev’s workaround is working as expected.
Unfortunately, just happened on puma-dev Version: 0.14 (go1.14.3) for me (installed via brew on macOS 10.15.7)
I am having the same issue. @evanphx we can screenshare if that helps. my go-fu is limited but am keen to learn to be able to help out.
Thanks @firedev, your way works.
This is still happening, both the bug and the workaround.
I can replicate this issue.
App is working fine:
I restart puma with
$ touch tmp/restart.txt
~/Library/Logs/puma-dev.log
says! Killing 'myapp' (8593)
Then I try to hit my app again:
And the logs only state
2016/09/21 20:25:15 http: proxy error: dial unix /Users/myuser/.puma-dev/myapp/tmp/puma-dev-863.sock: connect: connection refused
I then run
$ rm tmp/restart.txt
according to @firedev and the logs state:Then the app restarts as expected. The difference appears to be that the app never “shuts down and cleans up” when it’s touched. Only when
tmp/restart.txt
is removed.EDIT:
More debugging info from
$ curl -H "Host: puma-dev" localhost/events
:touch
results in:Whereas
rm
results in: