On Fri, Dec 20, 2013 at 11:41:26AM +0100, Albert Shih wrote:
> >
> > We kill sogod's that has been running for more than 15 cpuminutes, as
> > these are normally stuck in something. I believe your sogod's must
> > be stuck..
>
> Well I try this, actually only manually, for example I just kill some sogod
> process who eat ~150:00:00 time (since yesterday) and that make sogo crash
> (no more connection on the web-gui, need a service sogod restart).
>
> How you manage the kill ?
We run this cronjob every 5 minute:
---------------------------------------------------
#! /bin/sh -
#
# Kill sogo-processes that's been running too long.
too_long=15 # 00-59 minutes
ps -u sogo -opid,ppid,cputime | grep -v PPID | while read pid ppid time
do
# Don't kill main daemon.
if test "x$ppid" != "x1"
then
minutes=$(echo $time | cut -d: -f2)
if test $minutes -gt $too_long;
then
echo Killing $pid
ps -fp $pid
kill -9 $pid
fi
fi
done
---------------------------------------------------
>
> Can I ask what linux you using ?
RHEL6.
-jf
--
[email protected]
https://inverse.ca/sogo/lists