Puma Server hangs on restart

Viewed 583

Don't know how to exactly reproduce. It occurs on our production servers but not every time.

After deploy, we will issuse bundle exec pumactl -S pids/puma.state -F config/puma.rb restart (on Ubuntu 14.04 and Ubuntu 16.04). But from time to time, we encounter that one of the puma servers hangs at restarting for very very long time, that we could only kill -9 and start it again. There's no certain pattern of when/which it will stuck.

Like following, after 15 minutes the restart command is issued, I still sees:

$ ps -ef | grep puma
deployer  2535  6533 99 10:11 ?        08:33:16 puma: cluster worker 3: 6533 
deployer  2910  6533 99 10:14 ?        08:31:22 puma: cluster worker 2: 6533 
deployer  6533     1  0 01:08 ?        00:00:23 puma 3.8.2 (tcp://0.0.0.0:2801) 
deployer  9973  9683  0 18:47 pts/0    00:00:00 grep --color=auto puma

And if I run strace -p 6533 -q -f to attach and check inside puma process, I get this: https://gist.github.com/larryzhao/446234a3af91bec917119494f9bc2384

Just don't know where to look into.

I am running on ruby 2.3.4p301 (2017-03-30 revision 58214) [x86_64-linux] with Rails 5.0.5 and Puma 3.8.2

0 Answers
Related