Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 17th July 2012, 04:29
flameproof flameproof is offline
Member
 
Join Date: Dec 2008
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default Monit not restarting stalled programs - how to troubleshoot?

I have Monit running on my CentOS 5.2 VPS. Due to probably lack of RAM (and probably some memory hogs in my VPS range) some programs stall sometimes.

Management software is Webmin/Virtualmin.

So far Monit restarted them. However, since a short while Monit will no restart Postfix and Dovecot. Monit itself sometimes stalls too, but when I restart it my understanding is that will autostart other apps that are down - and it doesn't.

How can I troubleshoot that?

/etc/monit.d/monitrc :

Code:
set daemon  60
set logfile syslog facility log_daemon
set mailserver localhost
set mail-format { from: abuse@****.com }
set alert admin@**********.com
#set httpd port 2812 and
#     SSL ENABLE
#     PEMFILE  /var/certs/monit.pem
#     allow admin:test

check process postfix with pidfile /var/spool/postfix/pid/master.pid
   group mail
   start program = "/etc/init.d/postfix start"
   stop  program = "/etc/init.d/postfix stop"
   if failed port 25 protocol smtp then restart
   if 5 restarts within 5 cycles then timeout

check process dovecot with pidfile /var/run/dovecot/master.pid
   group mail
   start program = "/etc/init.d/dovecot start"
   stop  program = "/etc/init.d/dovecot stop"
   if failed port 25 protocol smtp then restart
   if 5 restarts within 5 cycles then timeout

check process usermin with pidfile /var/usermin/miniserv.pid
   start program = "/etc/init.d/usermin start"
   stop  program = "/etc/init.d/usermin stop"
   group misc
   if failed host 127.0.0.1 port 20000 type tcp then restart
   depends usermin_init
	
check file usermin_init with path /etc/init.d/usermin
group misc

check process webmin with pidfile /var/webmin/miniserv.pid
start program = "/etc/init.d/webmin start"
stop  program = "/etc/init.d/webmin stop"
group misc
if failed host 127.0.0.1 port 10000 type tcp then restart
depends webmin_init
	
check file webmin_init with path /etc/init.d/usermin
group misc
__________________
CentOS 5.2 - Apache 2.2.3 - MySQL 5.0.45 - php 5.1.6 - Postfix 2.3.3
Reply With Quote
Sponsored Links
  #2  
Old 17th July 2012, 19:02
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
 
Default

Which virtualization technique do you use? Do you have access to the host system?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 03:05.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.