4 ms·
Yeah, I was a little confused by this at first because Heroku also has "workers" which are dynos provisioned to churn through queued background jobs, but unicor
by aculver 13y ago
Yeah, I was a little confused by this at first because Heroku also has "workers" which are dynos provisioned to churn through queued background jobs, but unicorn "workers" are totally different: They're processes forked within the web dyno so a single server can process requests concurrently. Each forked process has the entire memory footprint of the Rails app (about 200-250 MB for us), so the more memory you have the more forked processes you can run on a single dyno.
This reduces H12 errors because the more concurrency you have in a single process the less likely it is that Heroku's random routing layer is going to send a request to a dyno that is unable to handle the request because it's busy handling another long running request. As long as long running requests are the exception and not the rule, this should solve the problem.
- jplewicke 13y agoThere's also HireFire, which has support for scaling all your Heroku process types, not just your web processes: http://hirefire.io/ http://hirefire.io/ . I've used them for a few projects which honestly have never actually needed auto-scaling, but they're very easy to use overall and at $10/month are way underpriced. They do have a slower polling frequency (1 minute instead of 15 seconds) though.
- jwarzech 13y agoHireFire is fantastic (can't recommend it enough for people using Heroku). We use it at backstitch (http://backstit.ch http://backstit.ch) and it has saved us a ton of cash early-on.