Puma hangs after file change
Summary
Encountered when developing locally.
After changing a Ruby file, the Puma server hangs (and subsequently times out).
@tigerwnz @ashmckenzie and I worked on this today and found that if you comment the before_fork
in puma.rb
(line 55-61), and comment out preload_app!
, then the server will work after a file change but very slowly.
Running on:
ProductName: Mac OS X
ProductVersion: 10.15.4
BuildVersion: 19E287
ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-darwin19]
GDK commit `07fe0d53032dd2621219f34eb5f9d59c538ce07b`
Steps to reproduce
- Boot up GDK
- Change a ruby file
- Reload the page
- Puma will timeout
Attempts to fix
- Increase
ulimit
withulimit -n 9999
. - Sounds similar to https://github.com/puma/puma/issues/1730, but I note that fix is already in
gitlab-puma
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)