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.0 required=3.0 tests=AWL,HK_RANDOM_FROM, MSGID_FROM_MTA_HEADER,TVD_RCVD_IP shortcircuit=no autolearn=no version=3.3.2 Path: news.gmane.org!not-for-mail From: Eric Wong Newsgroups: gmane.comp.lang.ruby.rainbows.general Subject: Re: Sinatra stream(:keep_open) not holding connections open Date: Wed, 5 Dec 2012 01:44:54 +0000 Message-ID: <20121205014454.GA24401@dcvr.yhbt.net> References: 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 1354671901 13051 80.91.229.3 (5 Dec 2012 01:45:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 5 Dec 2012 01:45:01 +0000 (UTC) To: Rainbows! list Original-X-From: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Wed Dec 05 02:45:15 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 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) 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:415 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 1Tg42y-0007aq-DC for gclrrg-rainbows-talk@m.gmane.org; Wed, 05 Dec 2012 02:45:12 +0100 Received: from localhost.localdomain (localhost [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id DFF832E07A; Wed, 5 Dec 2012 01:44:59 +0000 (UTC) Received: from dcvr.yhbt.net (dcvr.yhbt.net [64.71.152.64]) by rubyforge.org (Postfix) with ESMTP id 583002E077 for ; Wed, 5 Dec 2012 01:44:55 +0000 (UTC) Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 6F33F1F703; Wed, 5 Dec 2012 01:44:54 +0000 (UTC) "W. Andrew Loe III" wrote: > I'm running Rainbows with EventMachine and struggling to get it to > keep the connections open. > > First, here is my code: https://gist.github.com/c33598db8a113b574165 I'll take a closer look later today. Can you use a public gist (or any other public git repo) instead of a private one? Private gists make no sense for public bug reports. > This application works on Thin. > > The main loop handles the HTTP request and creates a Celluloid Actor > that hangs out waiting on messages from Redis, when it receives a > message it dispatches it to the stream which EM then pushes out to the > client. Eventually the client will disconnect (this is Server-Sent > Events) and the Actor is torn down. Can you reproduce the issue with a stripped down application that does not depend on Redis? How about one that does not depend on Celluloid? > I want to run under Rainbows! for the hot upgrades and to re-use all > of the wonderful scripts I have for managing my Rails/Unicorn stack. > What I see is the GET handler executed, the Actor spawned, then the > connection is closed and the Actor is terminated. The browser then > reconnects. It doesn't ever have the opportunity to dispatch a message > the Actor doesn't even connect to Redis before it is terminated. > Response times are something like 0.0011 seconds, nothing is being > done. > > I'd prefer not to pull in Sinatra::Async, I'd like to know why it > works with Thin out-of-the-box, but not Rainbows! I would too! I wasn't aware of stream(:keep_open) until now. I'll check it out 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