Skip to content

Instantly share code, notes, and snippets.

View mgrigoriev's full-sized avatar

Mikhail Grigoriev mgrigoriev

View GitHub Profile
# 1. Clear retry set
Sidekiq::RetrySet.new.clear
# 2. Clear scheduled jobs
Sidekiq::ScheduledSet.new.clear
# 3. Clear 'Processed' and 'Failed' jobs
worker_processes 1;
events {
worker_connections 1024;
}
http {
# passenger_root /home/deployer/.rvm/gems/ruby-2.3.3/gems/passenger-5.1.0;
# passenger_ruby /home/deployer/.rvm/gems/ruby-2.3.3/wrappers/ruby;
@mgrigoriev
mgrigoriev / askandhack
Created December 25, 2016 23:05
My monit conf
### Nginx ###
check process nginx with pidfile /opt/nginx/logs/nginx.pid
start program = "/etc/init.d/nginx start"
stop program = "/etc/init.d/nginx stop"
if cpu > 60% for 2 cycles then alert
if cpu > 80% for 5 cycles then restart
if memory usage > 80% for 5 cycles then restart
if failed host 127.0.0.1 port 80 protocol http
then restart
if 3 restarts within 5 cycles then timeout
AllCops:
Include:
- Rakefile
- config.ru
- lib/**/*.rake
Exclude:
- db/**/*
- bin/**/*
- config/**/*
- spec/**/*