Re: Dealing with big uploads and/or slow clients

2014-06-05 Thread Sam Saffron
Wouldn't you just use Rack Hijack for this, you can easily pull the socket out of the pipeline and then deal with the upload via eventmachine or what not. On Fri, Jun 6, 2014 at 11:27 AM, Eric Wong wrote: > BrĂ¡ulio Bhavamitra wrote: >> Hello all, > > Hello, please stop sending HTML email, my spa

Re: No, passenger 5.0 is not faster than unicorn :)

2014-12-03 Thread Sam Saffron
I covered this here: http://discuss.topazlabs.com/t/amidst-blizzards-they-rest/1147 it seems like an odd marketing move to me ... optimising a bit that needs very little help. heck ripping out hashie and the 50 frames omniauth injects would have a significantly bigger impact on rails apps out ther

Re: No, passenger 5.0 is not faster than unicorn :)

2014-12-03 Thread Sam Saffron
oops sent wrong link meant to send this https://meta.discourse.org/t/raptor-web-server/21304/6 On Wed, Dec 3, 2014 at 8:56 PM, Sam Saffron wrote: > I covered this here: > http://discuss.topazlabs.com/t/amidst-blizzards-they-rest/1147 > > it seems like an odd marketing move to me ..

Re: No, passenger 5.0 is not faster than unicorn :)

2014-12-03 Thread Sam Saffron
Yeah, anonymous caching is super critical, we monkey it in here: https://github.com/discourse/discourse/blob/master/lib/middleware/anonymous_cache.rb to be honest this really should be part of rails. On Wed, Dec 3, 2014 at 10:00 PM, Hongli Lai wrote: > Unicorn *is* in general very good and very e

Re: Please join the Rack Specification discussion for `env['upgrade.websocket']`

2016-08-08 Thread Sam Saffron
For the record Eric, We use unicorn at Discourse to serve concurrent long polls across 100s of hosted forums using hijack with zero issues using https://github.com/SamSaffron/message_bus I am not particularly enthused WebSockets and have blogged about my reservations, in an HTTP/2 world I am less

Master wait time metric

2016-10-31 Thread Sam Saffron
Hi Eric / everyone :) I would like to start graphing how long our master process spends waiting for worker processes to be available. This metric will allow us to quickly tell if a unicorn is being overloaded and allow us to quickly remediate. Once a minute I want to ask the master process how l

Re: Master wait time metric

2016-11-01 Thread Sam Saffron
Brilliant, this will make it super easy to write a Prometheus exporter, will post here once I am done. On Tue, Nov 1, 2016 at 10:36 AM, Eric Wong wrote: > Sam Saffron wrote: >> Hi Eric / everyone :) >> >> I would like to start graphing how long our master process spends

Re: WTF is up with memory usage nowadays?

2016-12-11 Thread Sam Saffron
As to who is at fault here, it is a little bit of "everyone" in a big bucket. - The new GC is far more memory hungry than 1.9 line, even with `RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR=1.5` it is still a lot more space than it used to - Ruby have been very slow at dealing with the "elephant in the room

env reuse and hijack

2017-11-28 Thread Sam Saffron
I was reading through unicorn today and noticed that it uses `HttpParser_clear` to clear up env between requests as opposed to allocating a new `env` object. This is generally fine, but if you hijack a request you may want to still look at env after this is done leading to situations where you are

Auto scaling workers with unicorn

2017-12-04 Thread Sam Saffron
I would like to amend Discourse so we "automatically" absorb certain traffic spikes. As it stands we can only configure unicorn with num_workers and use TTIN and TTOUT to tune the number on the fly. I was wondering if you would be open to patching unicorn to allow it to perform auto-tuning based o

Log URL with murder_lazy_workers

2018-01-14 Thread Sam Saffron
I would love to start logging the actual URL that timed out when murder_lazy_workers does its thing. Clearly the master process has no knowledge here, but perhaps if we had a named pipe from each child to master we could quickly post current url down the pipe so we would have something to log when

Re: Log URL with murder_lazy_workers

2018-01-14 Thread Sam Saffron
ome hacking on the pg gem. I am just not sure how hacking at timeout can make stuff any better, it is an escape hatch, just in case code misbehaves. On Mon, Jan 15, 2018 at 12:57 PM, Eric Wong wrote: > Sam Saffron wrote: >> I would love to start logging the actual URL

Re: Log URL with murder_lazy_workers

2018-01-14 Thread Sam Saffron
per statement. Thanks for the suggestion of the info file, I will consider adding something like it. Sam On Mon, Jan 15, 2018 at 1:40 PM, Jeremy Evans wrote: > On Sun, Jan 14, 2018 at 6:18 PM, Sam Saffron wrote: >> >> It is super likely this could be handled in th

KGIO issues under WSL

2018-08-13 Thread Sam Saffron
Howdy, For some crazy reason we really want to run Unicorn on Windows Subsytem for Linux. We only use Unicorn in production and some of our devs like using WSL for "crazy reasons TM". I guess the on-boarding is somewhat easier for Windows users vs spinning up a proper VM. WSL overall works fine