Hi,
I'm encountering a weird error where the unicorn workers are stuck in
a loop after hitting a 500 on the backend sinatra app.
strace at the point where it starts to go into a loop of death
select(7, [4 5], NULL, [3 6], {30, 0}) = 1 (in [5], left {27, 274382})
fchmod(8, 01) = 0
fcntl(5, F_GETFL) = 0x802 (flags O_RDWR|O_NONBLOCK)
accept4(5, {sa_family=AF_INET, sin_port=htons(56728),
sin_addr=inet_addr("10.1.1.4")}, [16], SOCK_CLOEXEC) = 12
recvfrom(12, 0x1c99fb0, 16384, 64, 0, 0) = -1 EAGAIN (Resource
temporarily unavailable)
select(13, [12], NULL, NULL, NULL) = ? ERESTARTNOHAND (To be restarted)
--- SIGINT (Interrupt) @ 0 (0) ---
rt_sigreturn(0x2) = -1 EINTR (Interrupted system call)
sched_yield() = 0
sched_yield() = 0
sched_yield() = 0
sched_yield() = 0
sched_yield() = 0
Longer strace outputs can be found over at
https://gist.github.com/fe4e3172994e5de21317
I close any open db connections in before_fork and reopen connections
in after_fork. A bit of research suggests that rb_thread_wait has
issues when the select receives ERESTARTNOHAND, any ideas as to why
this might be happening ?
I'm running
$ uname -a
Linux bbox 2.6.38-02063806-generic #201105121509 SMP Thu May 12
15:14:14 UTC 2011 x86_64 GNU/Linux
$ ruby -v
ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux]
Thanks
_______________________________________________
Unicorn mailing list - [email protected]
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying