[Server-devel] Ejabberd CPU/RAM Spike -> Crashes

crodas crodas at paraguayeduca.org
Mon Dec 21 10:18:46 EST 2009


Hello,

According to the ticket the solution is a locking file which prevent the
re-execution. Well, I've wrote a dumb script awhile ago that might help,
it's not innovating, but it might help:

#!/bin/bash

LOCK=/tmp/erlang.lock
CMD=$1
if [ -f $LOCK ]
then
    PID=`cat $LOCK`
    UP=`ps $PID | wc -l`
    if [ $UP -gt 1 ]
    then
        exit;
    fi
fi
echo $$ > $LOCK
$CMD

If it worth add to the repository, please let me know and I will submit a
patch.

Cheers, 

On Mon, 21 Dec 2009 15:36:50 +0100, Martin Langhoff
<martin.langhoff at gmail.com> wrote:
> On Mon, Dec 21, 2009 at 3:32 PM, Martin Langhoff
> <martin.langhoff at gmail.com> wrote:
>> I've added a big lock around the process, so from now on Moodle
>> processes won't overlap in this sync. This means that your server is
>> now running a lightly patched Moodle -- I will release this as a new
>> rpm soon.
> 
> Filed as http://dev.laptop.org/ticket/9922 -
> 
> cheers,
> 
> 
> 
> m
> -- 
>  martin.langhoff at gmail.com
>  martin at laptop.org -- School Server Architect
>  - ask interesting questions
>  - don't get distracted with shiny stuff  - working code first
>  - http://wiki.laptop.org/go/User:Martinlanghoff
> _______________________________________________
> Server-devel mailing list
> Server-devel at lists.laptop.org
> http://lists.laptop.org/listinfo/server-devel


More information about the Server-devel mailing list