title: monit status is failed but process works fine
body: <p>I am trying to deploy gunicorn using bosh release.It is randomly failing.some time it works fine other time it fails.</p>
  
  <p>monit summary</p>
  
  <pre><code>Process 'gunicorn'                  Execution failed
  Process 'nginx'                     running
  Process 'consul'                    running
  </code></pre>
  
  <p>monit log is</p>
  
  <pre><code>[UTC Jul  9 11:56:06] error    : 'gunicorn' process is not running
  [UTC Jul  9 11:56:06] info     : 'gunicorn' trying to restart
  [UTC Jul  9 11:56:06] info     : 'gunicorn' start: /var/vcap/jobs/gunicorn/bin/monit_debugger
  [UTC Jul  9 11:56:11] info     : start service 'consul' on user request
  [UTC Jul  9 11:56:11] info     : monit daemon at 1383 awakened
  [UTC Jul  9 11:56:11] info     : start service 'nginx' on user request
  [UTC Jul  9 11:56:11] info     : monit daemon at 1383 awakened
  [UTC Jul  9 11:56:11] info     : start service 'gunicorn' on user request
  [UTC Jul  9 11:56:11] info     : monit daemon at 1383 awakened
  [UTC Jul  9 11:56:36] error    : 'gunicorn' failed to start
  [UTC Jul  9 11:56:36] info     : 'nginx' start: /var/vcap/jobs/nginx/bin/monit_debugger
  [UTC Jul  9 11:56:37] info     : 'nginx' start action done
  [UTC Jul  9 11:56:37] info     : 'consul' start: /var/vcap/jobs/consul/bin/monit_debugger
  [UTC Jul  9 11:56:38] info     : 'consul' start action done
  [UTC Jul  9 11:56:38] info     : Awakened by User defined signal 1
  [UTC Jul  9 11:56:38] info     : 'gunicorn' start: /var/vcap/jobs/gunicorn/bin/monit_debugger
  [UTC Jul  9 11:57:08] error    : 'gunicorn' failed to start
  [UTC Jul  9 11:57:08] info     : 'gunicorn' start action done
  [UTC Jul  9 11:57:18] error    : 'gunicorn' process is not running
  [UTC Jul  9 11:57:18] info     : 'gunicorn' trying to restart
  [UTC Jul  9 11:57:18] info     : 'gunicorn' start: /var/vcap/jobs/gunicorn/bin/monit_debugger
  [UTC Jul  9 11:57:48] error    : 'gunicorn' failed to start
  [UTC Jul  9 11:57:58] error    : 'gunicorn' process is not running
  [UTC Jul  9 11:57:58] info     : 'gunicorn' trying to restart
  [UTC Jul  9 11:57:58] info     : 'gunicorn' start: /var/vcap/jobs/gunicorn/bin/monit_debugger
  [UTC Jul  9 11:58:28] error    : 'gunicorn' failed to start
  [UTC Jul  9 11:58:38] error    : 'gunicorn' process is not running
  [UTC Jul  9 11:58:38] info     : 'gunicorn' trying to restart
  [UTC Jul  9 11:58:38] info     : 'gunicorn' start: /var/vcap/jobs/gunicorn/bin/monit_debugger
  [UTC Jul  9 11:59:08] error    : 'gunicorn' failed to start
  [UTC Jul  9 11:59:18] info     : 'gunicorn' process is running with pid 5670
  </code></pre>
  
  <p>process is also working fine<br>
  ps -ef </p>
  
  <pre><code>root      5670     1  0 11:59 ?        00:00:02 /usr/bin/python /usr/local/bin/gunicorn --workers 3 --bind 0.0.0.0:8000 idmapi.wsgi:application
  root      5682  5670  0 11:59 ?        00:00:00 /usr/bin/python /usr/local/bin/gunicorn --workers 3 --bind 0.0.0.0:8000 idmapi.wsgi:application
  root      5685  5670  0 11:59 ?        00:00:00 /usr/bin/python /usr/local/bin/gunicorn --workers 3 --bind 0.0.0.0:8000 idmapi.wsgi:application
  root      5686  5670  0 11:59 ?        00:00:00 /usr/bin/python /usr/local/bin/gunicorn --workers 3 --bind 0.0.0.0:8000 idmapi.wsgi:application
  </code></pre>
  
  <p>This  is happening randomly</p>
  
  <p>When gunicorn succeeds i get following log</p>
  
  <pre><code>[UTC Jul  8 22:32:31] error    : 'gunicorn' process is not running
  [UTC Jul  8 22:32:31] info     : 'gunicorn' trying to restart
  [UTC Jul  8 22:32:31] info     : 'gunicorn' start: /var/vcap/jobs/gunicorn/bin/monit_debugger
  [UTC Jul  8 22:32:36] info     : start service 'consul' on user request
  [UTC Jul  8 22:32:36] info     : monit daemon at 1375 awakened
  [UTC Jul  8 22:32:36] info     : start service 'nginx' on user request
  [UTC Jul  8 22:32:36] info     : monit daemon at 1375 awakened
  [UTC Jul  8 22:32:36] info     : start service 'gunicorn' on user request
  [UTC Jul  8 22:32:36] info     : monit daemon at 1375 awakened
  [UTC Jul  8 22:33:01] error    : 'gunicorn' failed to start
  [UTC Jul  8 22:33:01] info     : 'nginx' start: /var/vcap/jobs/nginx/bin/monit_debugger
  [UTC Jul  8 22:33:02] info     : 'nginx' start action done
  [UTC Jul  8 22:33:02] info     : 'consul' start: /var/vcap/jobs/consul/bin/monit_debugger
  [UTC Jul  8 22:33:03] info     : 'consul' start action done
  [UTC Jul  8 22:33:03] info     : Awakened by User defined signal 1
  [UTC Jul  8 22:33:03] info     : 'gunicorn' start: /var/vcap/jobs/gunicorn/bin/monit_debugger
  [UTC Jul  8 22:33:33] error    : 'gunicorn' failed to start
  [UTC Jul  8 22:33:33] info     : 'gunicorn' start action done
  [UTC Jul  8 22:33:43] error    : 'gunicorn' process is not running
  [UTC Jul  8 22:33:43] info     : 'gunicorn' trying to restart
  [UTC Jul  8 22:33:43] info     : 'gunicorn' start: /var/vcap/jobs/gunicorn/bin/monit_debugger
  [UTC Jul  8 22:34:13] error    : 'gunicorn' failed to start
  [UTC Jul  8 22:34:23] error    : 'gunicorn' process is not running
  [UTC Jul  8 22:34:23] info     : 'gunicorn' trying to restart
  [UTC Jul  8 22:34:23] info     : 'gunicorn' start: /var/vcap/jobs/gunicorn/bin/monit_debugger
  [UTC Jul  8 22:34:53] error    : 'gunicorn' failed to start
  [UTC Jul  8 22:35:03] error    : 'gunicorn' process is not running
  [UTC Jul  8 22:35:03] info     : 'gunicorn' trying to restart
  [UTC Jul  8 22:35:03] info     : 'gunicorn' start: /var/vcap/jobs/gunicorn/bin/monit_debugger
  [UTC Jul  8 22:35:33] error    : 'gunicorn' failed to start
  [UTC Jul  8 22:35:43] error    : 'gunicorn' process is not running
  [UTC Jul  8 22:35:43] info     : 'gunicorn' trying to restart
  [UTC Jul  8 22:35:43] info     : 'gunicorn' start: /var/vcap/jobs/gunicorn/bin/monit_debugger
  [UTC Jul  8 22:36:13] error    : 'gunicorn' failed to start
  [UTC Jul  8 22:36:23] error    : 'gunicorn' process is not running
  [UTC Jul  8 22:36:23] info     : 'gunicorn' trying to restart
  [UTC Jul  8 22:36:23] info     : 'gunicorn' start: /var/vcap/jobs/gunicorn/bin/monit_debugger
  [UTC Jul  8 22:36:25] info     : 'gunicorn' started
  [UTC Jul  8 22:36:35] info     : 'gunicorn' process is running with pid 5780
  </code></pre>
  
  <p><strong>UPDATE</strong></p>
  
  <pre><code>    check process gunicorn
    with pidfile /var/vcap/sys/run/gunicorn/gunicorn.pid
    start program "/var/vcap/jobs/gunicorn/bin/monit_debugger gunicorn_ctl '/var/vcap/jobs/gunicorn/bin/gunicorn_ctl start'"
    stop program "/var/vcap/jobs/gunicorn/bin/monit_debugger gunicorn_ctl '/var/vcap/jobs/gunicorn/bin/gunicorn_ctl stop'"
    group vcap
  </code></pre>