Status
Not open for further replies.

hekri

Well-Known Member
Oct 14, 2003
147
2
168
maybe shell script run every 10 minutes

ps aux | grep round | awk -F " " '{print $10}' | awk -F ":" '{print $1}'

it will print roundcube run time if > 100 kill found process
 

IIIBradIII

Member
Apr 13, 2003
21
0
151
Need this fixed ASAP

Wow, we could use a fix for this. We had a server that'd been slow for a few days - we finally checked into it and sure enough, it was this roundcube process going nutso. We would certainly appreciate a speedy fix to this, Cpanel folks. TIA
 

hekri

Well-Known Member
Oct 14, 2003
147
2
168
Run thise every 30 minutes for root cron, will automaticaly chceck roundcube process if hang kill process :) on my server fixed problem :) on Centos 4.x and Centos 5.x


Code:
#!/bin/sh

for ROUND in `ps aux | grep roundcube | awk -F " " '{print $10}' | awk -F ":" '{print $1}'`;
do

if [ $ROUND -ge 20 ]; then
pkill -u cpanelroundcube
echo "kill roundcube process roundcube";
fi

done
 

linuxserverguy

Active Member
Apr 14, 2005
26
0
151
nice suggestion there @hekri

Any update Cpanel guys? any hotfix for this or anything due in next stable version to resolve this?
 

hostwaffle09

Registered
Jun 29, 2009
1
0
51
Well, here are my tries. First of all I've tried to install imapproxy in front of RC. After that CPU load terribly increased to 70! I mentioned that number of concurrent IMAP connections was always the same in that case and was equal to 10. Bingo! I have courier-imap as IMAP server and MAXPERIP setting was 10. That was the point. All other IMAP connections above 10th gave such terrible load. I increased this setting to 100 for the IP-address of RC and deinstalled imapproxy because unfortunately it creates too much concurrent ESTABLISHED connections to the IMAP server and causes "mini DOS attack" as I called it...

Thanks.

Regards

web space hosting
 

myeddie7

Member
Sep 22, 2007
19
1
53
Today, 1 of my cPanel servers nearly crashed. The load went upto 60 - 100. After more than 1 hour, I can finally login into server, kill all service and wait until the load went down. I found out that it was caused by cpanelro. too many process from this cpanelro. i run a latest build, cPanel 11.24.5-R37127 - WHM 11.24.2 - X 3.9

Anyone here knows how to avoid this in future ? Is there any security problem with Roundcube ? even i run on latest cPanel built?

Thanks
 

4u123

Well-Known Member
PartnerNOC
Jan 2, 2006
943
28
178
Today, 1 of my cPanel servers nearly crashed. The load went upto 60 - 100. After more than 1 hour, I can finally login into server, kill all service and wait until the load went down. I found out that it was caused by cpanelro. too many process from this cpanelro. i run a latest build, cPanel 11.24.5-R37127 - WHM 11.24.2 - X 3.9

Anyone here knows how to avoid this in future ? Is there any security problem with Roundcube ? even i run on latest cPanel built?

Thanks
Try reading this forum. We've been using this suggestion...

http://forums.cpanel.net/webhost-manager/102425-webmail-high-load-3.html#post533961

Not had a problem since. Yes its a workaround not a fix but works as a short term solution.
 

NetX

Well-Known Member
Jun 18, 2003
177
0
166
I have the same problem on my servers (the updated to stable cpanel version ahvent fixed the problem)


cPanel 11.24.4-C37008 - WHM 11.24.2 - X 3.9
REDHAT Enterprise 4 i686 standard on server
 

denver

Member
Nov 8, 2006
13
0
151
If anyone is interested, the problem seems to be a never ending loop caused when trying to log in with an invalid account( eg. [email protected]).

I have modified the file:

/usr/local/cpanel/base/3rdparty/roundcube/program/lib/imap.inc

and introduced a counter in function iil_C_Login (line 416).

Bellow are the modifications i made in order to stop the loop from taking over the server.

Code:
function iil_C_Login(&$conn, $user, $password) {

    iil_PutLine($conn->fp, 'a001 LOGIN "'.iil_Escape($user).'" "'.iil_Escape($password).'"');
    $counter = 0;
    do {
        $line = iil_ReadReply($conn->fp);
        if ($line === false) {
            break;
        }else if($counter > 0){
                break;
        }
        $counter = $counter + 1;
    } while (!iil_StartsWith($line, 'a001 ', true));
    // process result
    $result = iil_ParseResult($line);
    if ($result == 0) {
        $conn->error    .= '';
        $conn->errorNum  = 0;
        return $conn->fp;
    }

    fclose($conn->fp);

    $conn->error    .= 'Authentication for ' . $user . ' failed (LOGIN): "';
    $conn->error    .= htmlspecialchars($line)."\"";
    $conn->errorNum  = $result;

    return $result;
}
With these modifications an error is returned to the user after a short while letting him know there was a problem connecting to the IMAP server. If you want to return a "Login failed" you have to modify the function iil_ParseResult (line 288) like so:

Code:
function iil_ParseResult($string) {
        $a = explode(' ', $string);
        if (count($a) > 2) {
                if (strcasecmp($a[1], 'OK') == 0) {
                        return 0;
                } else if (strcasecmp($a[1], 'NO') == 0) {
                        return -1;
                } else if (strcasecmp($a[1], 'BAD') == 0) {
                        return -2;
                } else if (strcasecmp($a[1], 'BYE') == 0) {
                        return -3;
                }
        }else if(!$string){
                return -1;
        }
        return -4;
}
Hope this helps someone.
 

konrath

Well-Known Member
May 3, 2005
366
1
166
Brasil
Yours suggestions not solved the problem. Iam waiting the update from cpanel.

I have turned off the roundcube on my servers.
 
Last edited:

denver

Member
Nov 8, 2006
13
0
151
Cpanel usually overwrites any manual changes when you upcp. Its best to wait for roundcube to release a stable version and for CPanel to upgrade (although that could take some time).

Or it could be a different bug all together, but this fixed it on my personal (non-cpanel) VPS.
 

hekri

Well-Known Member
Oct 14, 2003
147
2
168
Maybe someone from cpanel will put here all code of the file: program/lib/imap.inc ??!! how many months we should wait for fix thise problem!
 

konrath

Well-Known Member
May 3, 2005
366
1
166
Brasil
Is very ridiculous keep this bug.

Iam lost users because I turned off the roundcube.

Thank you CPANEL DEVELOPERS.
 

hekri

Well-Known Member
Oct 14, 2003
147
2
168
Yes no one fix that, cpanel do nothing to help us. I pay couple tousand $$ per cpanel licenses and thing that should propably change to Direct Admin...
 

rligg

Well-Known Member
Sep 16, 2003
275
0
166
Run thise every 30 minutes for root cron, will automaticaly chceck roundcube process if hang kill process :) on my server fixed problem :) on Centos 4.x and Centos 5.x


Code:
#!/bin/sh

for ROUND in `ps aux | grep roundcube | awk -F " " '{print $10}' | awk -F ":" '{print $1}'`;
do

if [ $ROUND -ge 20 ]; then
pkill -u cpanelroundcube
echo "kill roundcube process roundcube";
fi

done
What do you name this script. I tried calling it roudcubefix.sh, but I cannot execute it. Says file not found.
 
Status
Not open for further replies.