Hi folks, I've the following configuration for Unicorn(Rails application server):
check process unicorn_staging_app.com with pidfile /var/www/vhosts/app.com/httpdocs/shared/pids/unicorn.pid
start program = "/etc/init.d/unicorn start /etc/unicorn/app.com.conf" stop program = "/etc/init.d/unicorn stop /etc/unicorn/app.com.conf" if mem is greater than 300.0 MB for 1 cycles then restart # eating up memory?
if cpu is greater than 50% for 2 cycles then alert # send an email to admin if cpu is greater than 80% for 3 cycles then restart # hung process?
Monit can stop the service but fail for start it, here is the log:
[CDT Sep 21 10:45:24] debug : restart service 'unicorn_staging_app.com' on user request [CDT Sep 21 10:45:24] info : monit daemon at 5482 awakened
[CDT Sep 21 10:45:24] info : Awakened by User defined signal 1
[CDT Sep 21 10:45:24] info : 'unicorn_staging_app.com' trying to restart [CDT Sep 21 10:45:24] info : 'unicorn_staging_app.com' stop: /etc/init.d/unicorn
[CDT Sep 21 10:45:26] info : 'unicorn_staging_app.com' start: /etc/init.d/unicorn [CDT Sep 21 10:45:56] error : 'unicorn_staging_app.com' failed to start
I can't find the reason for this problem, although the start program
command "/etc/init.d/unicorn start /etc/unicorn/app.com.conf" starts
the service fine, please any idea for this issue?