Am 19.10.2012 22:21, schrieb Ted Mittelstaedt: > Hi All, > > Last month I put in a new mailserver, here are the specs: > > FreeBSD 8.3 amd64bit > 8GB ram > 2TB mirrored disk space > dual Xeon E5310s > Intel motherboard > > top output: > > last pid: 82946; load averages: 0.71, 0.74, 0.65 up 5+06:39:07 > 13:12:33 > 94 processes: 1 running, 93 sleeping > CPU: 0.3% user, 0.0% nice, 0.5% system, 0.0% interrupt, 99.2% idle > Mem: 395M Active, 6058M Inact, 1061M Wired, 376M Cache, 827M Buf, 25M Free > Swap: 4096M Total, 548K Used, 4095M Free > > The problem is that for seemingly no reason every once in a while > spamd will exit. It seems to be graceful exit since it deletes it's > pid file - whereas if I do a kill -9 it will not delete the pid file. > > I ended up writing a script that checks once an hour for the existence > of spamd in the process table and if it's not there it restarts it. > > Over the last month it did it on > 10/3 > 10/4 > 10/5 > 10/8 > 10/11 > 10/15 > 10/17 > 10/18 twice > > there is no defined time it does it. Sometimes in the afternoon, > sometimes in the morning. This is under Perl 5.14.2. The core ram > consumed by the process does not appear to be increasing over time > that it is running. > > Any suggestions? > > Ted >
as workaround you can use monit for monitor and restart, also usefull for other services you might have to fit example to your needs and distro i.e http://mmonit.com/wiki/Monit/ConfigurationExamples#spamd check process spamd with pidfile /var/run/spamd.pid group mail start program = "/etc/init.d/spamd start" stop program = "/etc/init.d/spamd stop" if 5 restarts within 5 cycles then timeout if cpu usage > 99% for 5 cycles then alert if mem usage > 99% for 5 cycles then alert depends on spamd_bin depends on spamd_rc check file spamd_bin with path /usr/local/bin/spamd group mail if failed checksum then unmonitor if failed permission 755 then unmonitor if failed uid root then unmonitor if failed gid root then unmonitor check file spamd_rc with path /etc/init.d/spamd group mail if failed checksum then unmonitor if failed permission 755 then unmonitor if failed uid root then unmonitor if failed gid root then unmonitor -- Best Regards MfG Robert Schetterer [*] sys4 AG http://sys4.de, +49 (89) 30 90 46 64 Franziskanerstraße 15, 81669 München Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263 Vorstand: Patrick Ben Koetter, Axel von der Ohe, Marc Schiffbauer Aufsichtsratsvorsitzender: Joerg Heidrich