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=1.3 required=3.0 tests=AWL,MSGID_FROM_MTA_HEADER, RDNS_NONE shortcircuit=no autolearn=no 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: Timeout on Rainbows! Date: Sat, 24 Aug 2013 04:02:01 +0800 Message-ID: References: <20130823193519.GA30201@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 1377288763 13640 80.91.229.3 (23 Aug 2013 20:12:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 23 Aug 2013 20:12:43 +0000 (UTC) To: "Rainbows! list" Original-X-From: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Fri Aug 23 22:12:47 2013 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 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=Y4FfYD5cCljMSq0Kds+z1424/8JM5oL0HfaYgTxiLQk=; b=T/WRyuow5Uje4rtrgfza0gVBr5mbNbWX8NYgMKCxLEkLakMef7tAqvdfeVHQ0IaRVj 1/eSIvIFNsejQhxy1iiaBXDpsODgwgbKxQqFtniMRirq9jp6CVwQ5q2Y1bwLR1+ztK4p risDEt1Xsk+6Mu+sVPd8xNhHG9tn2OMTUhA+4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=Y4FfYD5cCljMSq0Kds+z1424/8JM5oL0HfaYgTxiLQk=; b=N3fijNml+X0MFwVql/OmjKTvLp/mVWBh6HmZOqq17BMBSqo5a5eRUZO2+S1rfR9XPS 5Yvb+2g5y/os5CK9jtzA4zmq4po4ZzlUehIosg9vibhKCFbNGPYjh2Nuv2AYyVjpDaBJ p0Bnzo6DmbUxtXy9GhlI0TmkzMgbxLXNq3Zk2Kcl269qNs72TlrF7UHS0pbhHWvh9JRU xJtPyRvnU435UErrABCYHoaevvp22NI9LqWd/HUNL2Se+0cDHKjnnqetCfiojOSWIeGy SqUrBcUfYT5CaxUTa74oCDkJJS0b9xqm+/5Sc1aG9etgi4w32GsAOgVYe5sf32teYuYl tiwA== X-Gm-Message-State: ALoCoQnnovU713/83RxOyw2pkM8wcq3N+xHjZphAa4RGiUghllIS5U8eesvPFZcAcDpi5rlQeNe6 X-Received: by 10.14.8.72 with SMTP id 48mr1761226eeq.25.1377288152220; Fri, 23 Aug 2013 13:02:32 -0700 (PDT) In-Reply-To: <20130823193519.GA30201-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org> 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 X-Broken-Reverse-DNS: no host name found for IP address 50.56.192.79 Xref: news.gmane.org gmane.comp.lang.ruby.rainbows.general:519 Archived-At: Received: from [50.56.192.79] (helo=rubyforge.org) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VCxiu-0008N0-9i for gclrrg-rainbows-talk@m.gmane.org; Fri, 23 Aug 2013 22:12:44 +0200 Received: from localhost.localdomain (localhost [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 6504D2E192; Fri, 23 Aug 2013 20:12:44 +0000 (UTC) Received: from mail-ee0-f49.google.com (mail-ee0-f49.google.com [74.125.83.49]) by rubyforge.org (Postfix) with ESMTP id 91D932E145 for ; Fri, 23 Aug 2013 20:02:34 +0000 (UTC) Received: by mail-ee0-f49.google.com with SMTP id d41so479504eek.36 for ; Fri, 23 Aug 2013 13:02:32 -0700 (PDT) Received: by 10.223.172.69 with HTTP; Fri, 23 Aug 2013 13:02:01 -0700 (PDT) On Sat, Aug 24, 2013 at 3:35 AM, Eric Wong wrote: > "Lin Jen-Shin (godfat)" wrote: >> I am reworking on thread pool for EventMachine, and just realized that >> Rainbows doesn't try to put a timeout for each request. Previously, >> I thought the timeout setup in Unicorn would be used for each request. > > The normal timeout is only a last resort (it works when the VM is hosed > on a worker). ThreadTimeout isn't nearly as reliable because it works > on the same VM/process, and it's still always preferable to rely on > "local" timeouts exposed by every library. (see > http://unicorn.bogomips.org/Application_Timeouts) [...] >> and I think in most cases we would want this timeout for each >> request. The down side might be that then the users cannot >> use their own Rainbows::ThreadTimeout (maybe?) or setup a custom >> threshold. > > Right. And some users (e.g. myself) don't ever use either timeout > feature. We audit every single line of code and make sure all > potentially long-running method calls have timeouts set appropriately. > (IMNSHO, this is the _only_ way to write applications for a > multi-threaded/evented platform) > >> Probably then we could introduce another timeout/threshold config >> in Configurator? I feel it would be common enough. > > Not worth it. It's not reliable enough nor generally useful enough > compared to the regular timeout (which again, is a last resort). I see, thank you very much. I'll take out ThreadTimeout in EventMachineThreadPool and add it into our application stack as a temporary workaround for now. _______________________________________________ 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