cpbandwd uses all memory / hangs server

esolutions

Member
Aug 16, 2006
18
0
151
Hi, I'm currently having a bad problem with cpbandwd. When it starts, it uses up all the RAM and causes the server to become unresponsive. Has anyone seen this before? Any help would be greatly appreciated. Please see details below.

This is a cPanel server that is being used only for email. The load of email is pretty heavy, almost 33,000 per hour if you count sender verification failures and unexpected disconnections. As a result the log files are pretty large, but not way out of line. The maillog is usually about 250-300 MB when they get rotated and the exim_mainlog is about 140 - 170 MB (we had to start rotating that one every day).

Yesterday the load increased so that the server became unresponsive and we had to reboot it twice before we found that the problem was being caused by cpbandwd. We killed the process and everything was fine. This morning I tried running /scripts/runlogsnow to see if the problem was still there and I almost lost the server again within 15 seconds. cpbandwd immediately paged out all the RAM and saturated the swap drive with requests.


WHM 11.1.0 cPanel 11.4.19-R14379
REDHAT Enterprise 4 i686 - WHM X v3.1.0
 

cPDan

cPanel Staff
Staff member
Mar 9, 2004
721
13
243
cpbandwd. When it starts, it uses up all the RAM and causes the server to become unresponsive.

Hello,

Excellent details. I'm reviewing our code currently to see where thi smight happen. In the meantime: this could happen if File::Tail was not using a buffer and the initiial read (or subsequent reload if it was rotated) was very large. Since we don't set a buffer size it should default to 16384 bytes.

What does this output as roto via SSH:

perl -MFile::Tail -le 'print $File::Tail::VERSION;print $];'
 

cPDan

cPanel Staff
Staff member
Mar 9, 2004
721
13
243
Hi, I'm currently having a bad problem with cpbandwd. When it starts, it uses up all the RAM and causes the server to become unresponsive. Has anyone seen this before? Any help would be greatly appreciated. Please see details below.
I see one place that is a bit inefficient and have a patch for it. If you create a ticket I'd be happy to apply this patch to your box to see if that helps or not, and if not investigate it further :)

thanks, please let me know the ticket ID and mark it 'ATTN Dan'

thanks!
 

esolutions

Member
Aug 16, 2006
18
0
151
Thank you for your quick response and attention to this problem.

Here is the output of the perl command:

Code:
[email protected] [/home/admin]# perl -MFile::Tail -le 'print $File::Tail::VERSION;print $];'
0.99.3
5.008008
[email protected] [/home/admin]#

I have created a support ticket as you requested.
The Request ID is 202984

Thanks again.