How do I run multiple processes on a dyno?

Issue

I want to run more than a single command in a dyno.

Resolution

The quickest way maybe to list the commands to run, each followed by an &, with a wait -n in the end, in the Procfile, e.g.:

web: puma -C config/puma.rb & sidekiq & wait -n

This runs all the command in the background. wait -n exits when at least one of the commands exits and triggers the dyno to restart. Please watch the app metrics so that the commands don't exhaust memory and CPU.

Ask on Stack Overflow

Engage with a community of passionate experts to get the answers you need

Ask on Stack Overflow

Heroku Support

Create a support ticket and our support experts will get back to you

Contact Heroku Support
Terms of Service Privacy Cookies © 2018 Salesforce.com