Enable WEB_CONCURRENCY to be set to a default value based on dyno size

Change effective on 02 March 2015

If a Ruby application has the configuration variable SENSIBLE_DEFAULTS set, then the configuration variable WEB_CONCURRENCY will be defaulted to a value based on the dyno size.

When enabled the value will default to:

  • 1X dynos: WEB_CONCURRENCY=2
  • 2X dynos: WEB_CONCURRENCY=4
  • PX dynos: WEB_CONCURRENCY=16

If WEB_CONCURRENCY is manually set, this functionality will be disabled.

You must deploy after setting SENSIBLE_DEFAULTS to activate this functionality.

$ heroku config:set SENSIBLE_DEFAULTS=enabled
$ git commit --allow-empty -m "enable sensible defaults"
$ git push heroku master
$ heroku run bash --size 2X
Running `bash` attached to terminal... up, run.7530
~ $ echo $WEB_CONCURRENCY
4

Optimizing dyno usage docs