unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Nokan Emiro <uzleepito@gmail.com>
To: mongrel-unicorn@rubyforge.org
Subject: HTTP streaming and Unicorn timeout
Date: Wed, 21 Aug 2013 12:28:55 +0200	[thread overview]
Message-ID: <CABmj=E6wffWKQYOfK7CyELRWMWgZWx0xrW5TgRfW8Wm+rasErQ@mail.gmail.com> (raw)

Hi guys,

I am working on a Rails app that needs to stream some data to the user and
I have just found out that Unicorn's timeout feature doesn't respect streaming.
Content generation is interrupted by Unicorn after the timeout is over.  I
had to comment out the timeout line in the Unicorn config and use
Rack::Timeout instead.  This way the streaming isn't interrupted, but the normal
requests (I mean those that don't use streaming) are forced to finish in the
defined period of time.

I'd like to know your opinion about that.  Why is Unicorn cutting off the app
even if it streams actively to the user?  Is there any better solutions to my
problem than using Rack::Timeout and switch off timing out in Unicorn?

Is that a bad idea that the timeout counter should restart counting after
each byte/packet/chunk traverses trough the connection?

Thanks for any comments, suggestions and observations,
U.
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying

             reply	other threads:[~2013-08-21 10:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-21 10:28 Nokan Emiro [this message]
2013-08-21 16:41 ` HTTP streaming and Unicorn timeout Eric Wong
2013-08-22 15:26   ` Nokan Emiro
2013-08-22 15:33     ` Hongli Lai
2013-08-22 17:04     ` 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/unicorn/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CABmj=E6wffWKQYOfK7CyELRWMWgZWx0xrW5TgRfW8Wm+rasErQ@mail.gmail.com' \
    --to=uzleepito@gmail.com \
    --cc=mongrel-unicorn@rubyforge.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhbt.net/unicorn.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).