From: Pere Joan Martorell <pere.joan@camaloon.com>
To: unicorn-public@bogomips.org
Subject: Random crash when sending USR2 + QUIT signals to Unicorn process
Date: Thu, 13 Jul 2017 20:48:23 +0200 [thread overview]
Message-ID: <CABre=GPLvUfz461BrZ2wFQtDFGFstaZ0ne1gA9i+75L8gTQ4xg@mail.gmail.com> (raw)
Hi, I'm experimenting with a Rack application and Unicorn and I have a
random error occurring when upgrading my app. When upgrading (sending
a USR2 + QUIT signals), 10% of the times unicorn master process and
its 2 worker processes start and after serving the first request they
crash.
This the stderror.log:
> 91.126.37.106 - - [13/Jul/2017:18:21:09 +0000] "GET /login HTTP/1.0" 200 1571 0.0473
> I, [2017-07-13T18:21:14.351677 #21426] INFO -- : executing ["/home/deployer/.rbenv/versions/2.4.1/bin/unicorn", "-c", "/home/deployer/apps/suppliers/current/config/unicorn.rb", "-E", "deployment", "-D", {12=>#<Kgio::UNIXServer:fd 12>}] (in /home/deployer/apps/suppliers/releases/20170713180855)
> I, [2017-07-13T18:21:14.351881 #21426] INFO -- : forked child re-executing...
> I, [2017-07-13T18:21:14.441075 #21426] INFO -- : inherited addr=/home/deployer/apps/suppliers/current/tmp/sockets/unicorn.socket fd=12
> I, [2017-07-13T18:21:14.441414 #21426] INFO -- : Refreshing Gem list
> I, [2017-07-13T18:21:14.576843 #21426] INFO -- : worker=0 spawning...
> I, [2017-07-13T18:21:14.577589 #21426] INFO -- : worker=1 spawning...
> I, [2017-07-13T18:21:14.578117 #21426] INFO -- : master process ready
> I, [2017-07-13T18:21:14.578866 #21430] INFO -- : worker=0 spawned pid=21430
> I, [2017-07-13T18:21:14.579053 #21430] INFO -- : worker=0 ready
> I, [2017-07-13T18:21:14.579649 #21432] INFO -- : worker=1 spawned pid=21432
> I, [2017-07-13T18:21:14.579790 #21432] INFO -- : worker=1 ready
> I, [2017-07-13T18:21:16.449066 #21369] INFO -- : reaped #<Process::Status: pid 21373 exit 0> worker=0
> I, [2017-07-13T18:21:16.449174 #21369] INFO -- : reaped #<Process::Status: pid 21375 exit 0> worker=1
> I, [2017-07-13T18:21:16.449207 #21369] INFO -- : master complete
> /home/deployer/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/unicorn-5.3.0/lib/unicorn/http_request.rb:80:in `parse': method `hash' called on unexpected T_NODE object (0x0055b15b973508 flags=0xaa31b) (NotImplementedError)
> from /home/deployer/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/unicorn-5.3.0/lib/unicorn/http_request.rb:80:in `read'
> from /home/deployer/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/unicorn-5.3.0/lib/unicorn/http_server.rb:606:in `process_client'
> from /home/deployer/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/unicorn-5.3.0/lib/unicorn/http_server.rb:702:in `worker_loop'
> from /home/deployer/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/unicorn-5.3.0/lib/unicorn/http_server.rb:549:in `spawn_missing_workers'
> from /home/deployer/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/unicorn-5.3.0/lib/unicorn/http_server.rb:142:in `start'
> from /home/deployer/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/unicorn-5.3.0/bin/unicorn:126:in `<top (required)>'
> from /home/deployer/.rbenv/versions/2.4.1/bin/unicorn:22:in `load'
> from /home/deployer/.rbenv/versions/2.4.1/bin/unicorn:22:in `<main>'
> /home/deployer/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/unicorn-5.3.0/lib/unicorn/http_request.rb:80:in `parse': method `hash' called on unexpected T_NODE object (0x0055b15b973508 flags=0xaa31b) (NotImplementedError)
> from /home/deployer/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/unicorn-5.3.0/lib/unicorn/http_request.rb:80:in `read'
> from /home/deployer/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/unicorn-5.3.0/lib/unicorn/http_server.rb:606:in `process_client'
> from /home/deployer/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/unicorn-5.3.0/lib/unicorn/http_server.rb:702:in `worker_loop'
> from /home/deployer/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/unicorn-5.3.0/lib/unicorn/http_server.rb:549:in `spawn_missing_workers'
> from /home/deployer/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/unicorn-5.3.0/lib/unicorn/http_server.rb:142:in `start'
> from /home/deployer/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/unicorn-5.3.0/bin/unicorn:126:in `<top (required)>'
> from /home/deployer/.rbenv/versions/2.4.1/bin/unicorn:22:in `load'
> from /home/deployer/.rbenv/versions/2.4.1/bin/unicorn:22:in `<main>'
> E, [2017-07-13T18:21:29.147001 #21426] ERROR -- : reaped #<Process::Status: pid 21432 exit 1> worker=1
> I, [2017-07-13T18:21:29.147127 #21426] INFO -- : worker=1 spawning...
> I, [2017-07-13T18:21:29.150907 #21439] INFO -- : worker=1 spawned pid=21439
> I, [2017-07-13T18:21:29.151109 #21439] INFO -- : worker=1 ready
> E, [2017-07-13T18:21:29.153360 #21426] ERROR -- : reaped #<Process::Status: pid 21430 exit 1> worker=0
> I, [2017-07-13T18:21:29.153424 #21426] INFO -- : worker=0 spawning...
> I, [2017-07-13T18:21:29.154226 #21442] INFO -- : worker=0 spawned pid=21442
> I, [2017-07-13T18:21:29.154383 #21442] INFO -- : worker=0 ready
This is the configuration of unicorn:
> DEPLOY_TO = "/home/deployer/apps/suppliers" # The path in which capistrano caches deployed versions of the source
> CURRENT = "#{DEPLOY_TO}/current" # The current, deployed release
> UNICORN_PID = "#{CURRENT}/tmp/pids/unicorn.pid" # Unicorn server process id file
> UNICORN_STDOUT = "#{CURRENT}/log/unicorn.stdout.log" # Log file for messages on standard output
> UNICORN_STDERR = "#{CURRENT}/log/unicorn.stderr.log" # Log file for messages on standard error
> UNICORN_SOCKET = "#{CURRENT}/tmp/sockets/unicorn.socket" # Server socket
>
> # Set unicorn options
> working_directory CURRENT
> worker_processes 2
> preload_app true
> timeout 30
>
> # Set up socket location
> listen UNICORN_SOCKET, :backlog => 64
>
> # Logging
> stderr_path UNICORN_STDERR
> stdout_path UNICORN_STDOUT
>
> # Set master PID location
> pid UNICORN_PID
Any idea what is happening?
Thanks!
next reply other threads:[~2017-07-13 18:48 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-13 18:48 Pere Joan Martorell [this message]
2017-07-13 19:34 ` Random crash when sending USR2 + QUIT signals to Unicorn process Eric Wong
2017-07-14 10:21 ` Pere Joan Martorell
2017-07-14 21:16 ` Eric Wong
2017-07-14 22:50 ` Jeremy Evans
2017-07-15 0:15 ` Eric Wong
2017-07-15 1:34 ` Jeremy Evans
2017-07-15 4:45 ` Eric Wong
2017-07-15 7:56 ` Jeremy Evans
2017-07-17 14:32 ` Jeremy Evans
2017-07-24 1:25 ` Eric Wong
2017-08-07 6:16 ` Jeremy Evans
2017-08-07 20:18 ` Eric Wong
2017-10-03 14:52 ` Xuanzhong Wei
2017-10-03 17:15 ` Eric Wong
2017-10-03 18:20 ` Xuanzhong Wei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://yhbt.net/unicorn/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CABre=GPLvUfz461BrZ2wFQtDFGFstaZ0ne1gA9i+75L8gTQ4xg@mail.gmail.com' \
--to=pere.joan@camaloon.com \
--cc=unicorn-public@bogomips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhbt.net/unicorn.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).