unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
* worker freeze and strace interpretation
@ 2014-12-02 11:21 Jérémy Lecour
  2014-12-02 18:58 ` Eric Wong
  0 siblings, 1 reply; 3+ messages in thread
From: Jérémy Lecour @ 2014-12-02 11:21 UTC (permalink / raw)
  To: unicorn-public

Hi,

I've been trying to debug a weird situation on a Rails app (4.1) using
Unicorn (4.8.3).
Sometimes, some requests are hanging and I can't find why.


I've hooked "strace" to the workers and I have a lot of lines with
"Resource temporarily unavailable" and I wonder if it's normal.

Here is a snippet :

11587 write(7, "\27\3\3\1\253\36\274d\263\340\375\250d\374~X\364\306^\227{F\357~\223\347\245M\351-\360\301"...,
432 <unfinished ...>
11581 read(3,  <unfinished ...>
11587 <... write resumed> )             = 432 <0.000016>
11581 <... read resumed> 0x7f5b04878cc0, 1024) = -1 EAGAIN (Resource
temporarily unavailable) <0.000012>
11581 read(5,  <unfinished ...>
11587 write(7, "\27\3\3\t`+\22zIY\242\252L\346?n\245!\347c\251\341\fo\202Is\346\23\10\320\34"...,
2405 <unfinished ...>
11581 <... read resumed> "!", 1024)     = 1 <0.000016>
11587 <... write resumed> )             = 2405 <0.000015>
11581 read(5, 0x7f5b04878cc0, 1024)     = -1 EAGAIN (Resource
temporarily unavailable) <0.000014>
11587 read(7,  <unfinished ...>
11581 poll([{fd=3, events=POLLIN}], 1, 100 <unfinished ...>
11587 <... read resumed> 0x7f5af47c0123, 5) = -1 EAGAIN (Resource
temporarily unavailable) <0.000009>
11587 futex(0x7f5b04885054, FUTEX_WAKE_OP_PRIVATE, 1, 1,
0x7f5b04885050, {FUTEX_OP_SET, 0, FUTEX_OP_CMP_GT, 1}) = 1 <0.000005>
1184  <... futex resumed> )             = 0 <0.000226>
11587 futex(0x7f5b0488508c, FUTEX_WAIT_PRIVATE, 231, NULL <unfinished ...>
1184  futex(0x7f5b0488508c, FUTEX_WAKE_OP_PRIVATE, 1, 1,
0x7f5b04885088, {FUTEX_OP_SET, 0, FUTEX_OP_CMP_GT, 1} <unfinished ...>
11587 <... futex resumed> )             = -1 EAGAIN (Resource
temporarily unavailable) <0.000015>
1184  <... futex resumed> )             = 0 <0.000009>
11587 futex(0x7f5b04885020, FUTEX_WAIT_PRIVATE, 2, NULL <unfinished ...>
1184  futex(0x7f5b04885020, FUTEX_WAKE_PRIVATE, 1 <unfinished ...>
11587 <... futex resumed> )             = -1 EAGAIN (Resource
temporarily unavailable) <0.000007>
1184  <... futex resumed> )             = 0 <0.000008>



Is there a better way to hook into a worker process when the request
is hanging, to see what it is doing ?



Also, I didn't find a way to instrument how a worker handles a request.
I was looking for a debug message when a new request is taken and when
it is returned.


Thanks for any help.

-- 
Jérémy Lecour :
http://jeremy.wordpress.com - http://twitter.com/jlecour

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-12-02 21:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-02 11:21 worker freeze and strace interpretation Jérémy Lecour
2014-12-02 18:58 ` Eric Wong
2014-12-02 21:04   ` Jérémy Lecour

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).