5

I am getting started with Monit and don't have a lot of systems knowledge. I have a Ruby app running on Puma. I want to use Monit to automatically restart Puma if it ever dies. I'm currently using the Puma provided Capistrano 2 recipe which uses the control script instead of outputting the PID to a file.

Is there a way to configure monit to check the status of Puma to see if it should be restarted?

2

This is for Capistrano 3.

You can use the "official" Capistrano recipe for Puma. https://github.com/seuros/capistrano-puma

It has monit scripts built-in to monitor puma server processes. Just include require 'capistrano/puma/monit' in your Capfile. And run cap <stage> puma:monit:config . That's it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.