From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS33070 50.56.128.0/17 X-Spam-Status: No, score=0.0 required=3.0 tests=AWL,MSGID_FROM_MTA_HEADER, TVD_RCVD_IP shortcircuit=no autolearn=unavailable version=3.3.2 Path: news.gmane.org!not-for-mail From: "Lin Jen-Shin (godfat)" Newsgroups: gmane.comp.lang.ruby.rainbows.general Subject: Re: negative timeout in Rainbows::Fiber::Base Date: Tue, 18 Dec 2012 19:09:51 +0800 Message-ID: References: <20120829211707.GA22726@dcvr.yhbt.net> <20120831013731.GA16613@dcvr.yhbt.net> <20120905232739.GA25153@dcvr.yhbt.net> <20120922194222.GA6839@dcvr.yhbt.net> <20120928191132.GA14292@dcvr.yhbt.net> <20120928192449.GB14292@dcvr.yhbt.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1355829564 11718 80.91.229.3 (18 Dec 2012 11:19:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 18 Dec 2012 11:19:24 +0000 (UTC) To: "Rainbows! list" Original-X-From: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Tue Dec 18 12:19:39 2012 Return-path: Envelope-to: gclrrg-rainbows-talk@m.gmane.org X-Original-To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Delivered-To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org X-Greylist: delayed 482 seconds by postgrey-1.31 at rubyforge; Tue, 18 Dec 2012 11:18:28 UTC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=godfat.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=EH/XgbY9TADczMUuITuIY9zjNOjoTDDp2Rku2D7rqSI=; b=V41Ny1V4pbwEr7vCLSrla6EFKoFzeNyxwUYypaZRzQ8/vfwxzAt1f1p/pqwssq9uwU rYBb9uZMhtSQ4LEwinkFyispF8piWhz6ZtKbCpkbnuAv2Pmk0HpAELm7tpdsvh7Lq8Sg Acxhysjchfo0XfqY8vGcmLjULScn3BhyIR4zE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:x-gm-message-state; bh=EH/XgbY9TADczMUuITuIY9zjNOjoTDDp2Rku2D7rqSI=; b=WwxHeq6oxp2Qgs1TfojTsryP3mlsi8bz5FM+ek2J99yPri6vPkzni4nEhc8r9EjJqG r3stUb+uMMF7ilkdJhpVYHivOLCMcboY1jua1Vb1D6Ajw1/76EG5ykSJse01Tx2k3lSs RN0PhL6owGta+rrRx3/f9rBhVO1EmSSepWynzNOvLk2mRfOpoCA7wQa0dBQNIc48EGZD /bgIButrM0JpYhsbD2WJPemqtJ16fyK3yz2iDvF3oOQlA8r3GqvNZLUyOFANwv6lkbVe jAY2lVSQVEUlRSd6RQCVeH/hs5kAwEax2+4+CeVXkSsCa2aqJ/RzgDtwyIgJLA7JhVVD R0hA== In-Reply-To: <20120928192449.GB14292-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org> X-Gm-Message-State: ALoCoQmkrYg5Igy5/NJSz6w11ufSXAdc8Apl8bFFn6GMQ1T3rub4KJVAPc1akf3m5o7D6FP8BaHf X-BeenThere: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Errors-To: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Xref: news.gmane.org gmane.comp.lang.ruby.rainbows.general:420 Archived-At: Received: from 50-56-192-79.static.cloud-ips.com ([50.56.192.79] helo=rubyforge.org) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TkvD0-0005zL-RQ for gclrrg-rainbows-talk@m.gmane.org; Tue, 18 Dec 2012 12:19:39 +0100 Received: from localhost.localdomain (localhost [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id AADE52E079; Tue, 18 Dec 2012 11:19:23 +0000 (UTC) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com [209.85.215.44]) by rubyforge.org (Postfix) with ESMTP id C83C92E079 for ; Tue, 18 Dec 2012 11:18:28 +0000 (UTC) Received: by mail-la0-f44.google.com with SMTP id d3so396852lah.31 for ; Tue, 18 Dec 2012 03:18:27 -0800 (PST) Received: by 10.112.44.229 with SMTP id h5mr738629lbm.12.1355829021670; Tue, 18 Dec 2012 03:10:21 -0800 (PST) Received: by 10.114.24.130 with HTTP; Tue, 18 Dec 2012 03:09:51 -0800 (PST) On Sat, Sep 29, 2012 at 3:24 AM, Eric Wong wrote: > Eric Wong wrote: >> So the _actual_ Content-Length that's sent is zero? >> >> Rainbows! should drop a connection if an exception is raised while >> sending the response body, perhaps the heroku router is confused >> by that? > > Instead of trying "keepalive_timeout 0", you can also try using the > following middleware. This only works for Content-Length responses > (which seems to be your case) > > Of course, like all middleware, this makes your stack deeper, so > maybe it's not good, either... > > Furthermore, this code is totally untested, it may not even compile, > but I hope you get the idea and fix trivial errors :) [...] Thank you again for the helps. Since the conference (http://rubyconf.tw/2012) had ended, I got much more time to work with this now. I didn't try this middleware because now I feel it might be the problem in their application, given that it used a ton of gems which might have some thread-safety issues. On the other hand, the person who asked me about this telling me that it's fine to run Rainbows! with EventMachine, but not with ThreadPool. So it is very likely that it's their issues. As for the issue on my own last time, since it only happened on an application which we no longer run, and Rainbows! (Zbatery) runs totally fine on our true production side, I would guess it's a Heroku issue at that time and it might have been fixed already? As a result, I want to ignore this issue from now on, and move forward. I'll send a patch which contains the concurrency models we use on the production site later in a new thread. Also I might start trying to implement a new concurrency model based on celluloid-io which I believe the API would be similar to cool.io, thus might not be hard to implement. Hope we could get there soon :) _______________________________________________ Rainbows! mailing list - rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org http://rubyforge.org/mailman/listinfo/rainbows-talk Do not quote signatures (like this one) or top post when replying