From: "W. Andrew Loe III" <andrew-4trK/3dDa6Nl57MIdRCFDg@public.gmane.org> To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Subject: Sinatra stream(:keep_open) not holding connections open Date: Tue, 4 Dec 2012 17:19:28 -0800 [thread overview] Message-ID: <CA+-9oNeKevgZOvKUPs-3VF7qstn8BcNw3_Py0M50h-j5-GzvOA@mail.gmail.com> (raw) 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 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. 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! _______________________________________________ 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
next reply other threads:[~2012-12-05 1:25 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-12-05 1:19 W. Andrew Loe III [this message] [not found] ` <CA+-9oNeKevgZOvKUPs-3VF7qstn8BcNw3_Py0M50h-j5-GzvOA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2012-12-05 1:44 ` Eric Wong [not found] ` <20121205014454.GA24401-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org> 2012-12-05 2:16 ` W. Andrew Loe III [not found] ` <CA+-9oNd1EFqsniPkkPTwu5opTCinbM7-2KHoXov7+y3LE4s4Tg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2012-12-05 3:18 ` Eric Wong [not found] ` <20121205031848.GA32757-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org> 2012-12-05 6:09 ` W. Andrew Loe III [not found] ` <CA+-9oNfR9zM4phTShBsyjweAZBBYWF5egHw7MU8gcBf3f=fAJw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2013-01-19 0:21 ` W. Andrew Loe III [not found] ` <CA+-9oNdXyYrnyu3dfMuu7ULE7rhT_Rm48BCU_KaJUwsrmcj9-g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2013-01-19 1:01 ` W. Andrew Loe III [not found] ` <CA+-9oNedbb17X=6Eum0bOG3zEryrhnurvXui4Ye7TcRLrAFcUg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2013-01-19 1:09 ` Eric Wong
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style List information: https://yhbt.net/rainbows/ * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=CA+-9oNeKevgZOvKUPs-3VF7qstn8BcNw3_Py0M50h-j5-GzvOA@mail.gmail.com \ --email@example.com \ --cc=rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org \ --subject='Re: Sinatra stream(:keep_open) not holding connections open' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Code repositories for project(s) associated with this inbox: ../../rainbows.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).