14 Dec 2010 08:13
Re: rails 2 and slow external services
On Mon, Dec 13, 2010 at 10:35 PM, Eric Wong <normalperson <at> yhbt.net> wrote: > ghazel <at> gmail.com wrote: >> On Mon, Dec 13, 2010 at 8:57 PM, Eric Wong <normalperson <at> yhbt.net> wrote: >> > ghazel <at> gmail.com wrote: >> I'm running a bit of my traffic through some Rainbows! right now, but I got: >> >> 2010/12/14 02:30:24 [error] 3183#0: *9229917 upstream timed out (110: >> Connection timed out) while reading response header from upstream, >> client: 1.2.3.4, server: mysite.com, request: "GET /blah HTTP/1.1", >> upstream: "http://unix:/tmp/rainbows.sock:/blah", host: "mysite.com", >> referrer: "https://foofoo.com" >> 2010/12/14 04:28:25 [error] 3182#0: *9440717 upstream timed out (110: >> Connection timed out) while reading response header from upstream, >> client: 5.6.7.8, server: mysite.com, request: "GET /blah HTTP/1.1", >> upstream: "http://unix:/tmp/rainbows.sock:/blah", host: "mysite.com" >> >> From nginx in the error log. My proxy_read_timeout is 300, and my >> listen backlog is 2048 (for now...). Basically my Rainbows! config is >> identical to my Unicorn config, where I have not seen that happen, >> except I added "Rainbows! { use :ThreadPool; worker_connections 100 >> }". > > Was your app hitting the Unicorn kill -9 timeout frequently before? In > Rainbows!, the kill -9 timeout only kicks in when the entire > interpreter/VM is stuck due to a broken C extension or bug in Ruby. > > If it's some component of your app taking a long time (and relying on > the Unicorn kill -9 timeout), you can try the Rainbows::ThreadTimeout > middleware: http://rainbows.rubyforge.org/Rainbows/ThreadTimeout.html I'm not sure how I would know that - I'm not actually sure which timeout you mean. "timeout" in the config/unicorn.rb and config/rainbows.rb is 300, same as proxy_read_timeout. Is that it? Are you saying when that is hit that Rainbows! and Unicorn act differently? -Greg _______________________________________________ Rainbows! mailing list - rainbows-talk <at> rubyforge.org http://rubyforge.org/mailman/listinfo/rainbows-talk Do not quote signatures (like this one) or top post when replying
RSS Feed