[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Nginx 502 error Dreamhost

From: Houssan A. Hijazi
Subject: Nginx 502 error Dreamhost
Date: Fri, 15 Feb 2013 11:19:08 -0200


i still have errors (502 errors)..

i have this monit config:

check process nginx
with pidfile /dh/nginx/servers/httpd-xxxxxxx/var/logs/ #Pid file for nginx in my case it located in /opt/nginx/logs/
start program = "/etc/init.d/nginx start"
stop program = "/etc/init.d/nginx stop"
if failed host port 80 protocol HTTP then restart #set your server IP that runs nginx
if failed host port 80 protocol HTTP then alert
if 5 restarts with 5 cycles then alert
#check file webserver_count_php with path /tmp/php
# if match "\b[0-1][0-5]?|15\b" then alert # 0...15
# if match "\b[0-1][0-5]?|15\b" then exec "/usr/bin/killall -9 php53.cgi" # 0...15
check file webserver_response with path /tmp/web
if match "502" then exec "/usr/bin/killall -9 php53.cgi"
# if match "502" then exec "/etc/init.d/nginx restart"
if match "502" then alert
depends on nginx

in /tmp/web is a output from bash script see what is the code returned in webserver(200, 404, 502 etc..)

i have 502 in the last line inside /tmp/web, why the ruleĀ if match "502" then exec "/usr/bin/killall -9 php53.cgi" is not work? if i killall php53.cgi the host is failed so need restart (if failed host port 80 protocol)




Houssan A. HijaziĀ 

Analista de Sistemas /

reply via email to

[Prev in Thread] Current Thread [Next in Thread]