Last active
August 29, 2023 07:38
-
-
Save v1bh0r/9ecee572b192cab1ee23 to your computer and use it in GitHub Desktop.
Sidekiq Monit Configuration example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
check process sidekiq_myapp | |
with pidfile /path/to/sidekiq.pid | |
start program = "bundle exec sidekiq -C /path/to/sidekiq_conf.yml -P /path/to/sidekiq.pid" with timeout 30 seconds | |
stop program = "kill -s TERM `cat /path/to/sidekiq.pid`" with timeout 30 seconds | |
if totalmem is greater than 500 MB for 2 cycles then restart # VM bloat is common in Rails apps | |
if totalmem is greater than 800 MB for 1 cycles then restart # If a rogue job tries to consume memory quickly | |
group myapp_sidekiq |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment