You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm unable to monitor thin with monit because it's process name contains whitespace.
# ps aux | grep thin
gitosis 28109 0.0 15.3 253032 117244 ? D Jun11 0:33 thin server (/usr/share/redmine/tmp/sockets/thin.0.socket)
gitosis 28115 0.0 0.1 229912 872 ? S Jun11 0:14 thin server (/usr/share/redmine/tmp/sockets/thin.1.socket)
My monit rc file for thin.
check process thin-0
with pidfile /var/run/redmine/thin.0.pid
start program = "/etc/init.d/thin start"
stop program = "/etc/init.d/thin stop"
if totalmem > 150.0 MB for 10 cycles then restart
if failed unixsocket /var/run/redmine/sockets/default/thin.0.socket then restart
if failed unixsocket /var/run/redmine/sockets/default/thin.1.socket then restart
if cpu is greater than 40% for 2 cycles then alert
if cpu usage > 95% for 3 cycles then restart
if 5 restarts within 10 cycles then timeout
Here's how monit behaves:
# monit validate
'thin-0' process is not running
'thin-0' trying to restart
'thin-0' start: /etc/init.d/thin
[start] /etc/thin1.8/redmine.yml ...
Starting server on /usr/share/redmine/tmp/sockets/thin.0.socket ...
/var/lib/gems/1.8/gems/thin-1.2.11/lib/thin/daemonizing.rb:171:in `remove_stale_pid_file': /usr/share/redmine/tmp/pids/thin.0.pid already exists, seems like it's already running (process ID: 28109). Stop the process or delete /usr/share/redmine/tmp/pids/thin.0.pid. (Thin::PidFileExist)
from /var/lib/gems/1.8/gems/thin-1.2.11/lib/thin/daemonizing.rb:42:in `daemonize'
from /var/lib/gems/1.8/gems/thin-1.2.11/lib/thin/controllers/controller.rb:61:in `start'
from /var/lib/gems/1.8/gems/thin-1.2.11/lib/thin/runner.rb:185:in `send'
from /var/lib/gems/1.8/gems/thin-1.2.11/lib/thin/runner.rb:185:in `run_command'
from /var/lib/gems/1.8/gems/thin-1.2.11/lib/thin/runner.rb:151:in `run!'
from /var/lib/gems/1.8/gems/thin-1.2.11/bin/thin:6
from /usr/local/bin/thin:19:in `load'
from /usr/local/bin/thin:19
Starting server on /usr/share/redmine/tmp/sockets/thin.1.socket ...
/var/lib/gems/1.8/gems/thin-1.2.11/lib/thin/daemonizing.rb:171:in `remove_stale_pid_file': /usr/share/redmine/tmp/pids/thin.1.pid already exists, seems like it's already running (process ID: 28115). Stop the process or delete /usr/share/redmine/tmp/pids/thin.1.pid. (Thin::PidFileExist)
from /var/lib/gems/1.8/gems/thin-1.2.11/lib/thin/daemonizing.rb:42:in `daemonize'
from /var/lib/gems/1.8/gems/thin-1.2.11/lib/thin/controllers/controller.rb:61:in `start'
from /var/lib/gems/1.8/gems/thin-1.2.11/lib/thin/runner.rb:185:in `send'
from /var/lib/gems/1.8/gems/thin-1.2.11/lib/thin/runner.rb:185:in `run_command'
from /var/lib/gems/1.8/gems/thin-1.2.11/lib/thin/runner.rb:151:in `run!'
from /var/lib/gems/1.8/gems/thin-1.2.11/bin/thin:6
from /usr/local/bin/thin:19:in `load'
from /usr/local/bin/thin:19
^C'thin-0' failed to start
It also does not work if I make monit check the process thin nor "thin server (/usr/share/redmine/tmp/sockets/thin.1.socket)". The first because there no such process, the second because white-space and commas are not allowed in process names on monitrc files.
The text was updated successfully, but these errors were encountered:
I'm unable to monitor thin with monit because it's process name contains whitespace.
My monit rc file for thin.
Here's how monit behaves:
It also does not work if I make monit check the process
thin
nor"thin server (/usr/share/redmine/tmp/sockets/thin.1.socket)"
. The first because there no such process, the second because white-space and commas are not allowed in process names on monitrc files.The text was updated successfully, but these errors were encountered: