Bandwidth counted double (or more) on subdomains.

xtempore

Registered
Feb 18, 2010
1
0
51
I had a problem today when one of the domains on a VPS blew its bandwidth limit.

Or did it...?

You see, according to my webshosts admin page the usage for Feb, for ALL domains on the account, is 18.418GB/40GB.

But according to WHM and CPanel, the main domain has used 29.62 GB.

It's been a long time since I did maths at school, but unless I've somehow caused the spontaneous creation of anti-bandwidth, I think something doesn't add up.

I think CPanel/WHM may have lost the plot here.

You see the main domain has a few subdomains, and it is actually the subdomains that do the real work, and therefore consume most of the bandwidth.

The primary domain (www) is essentially just advertising, and should consume only a small amount of bandwidth, yet looking at the stats it is exceeding the usage of the subdomains.

That just didn't seem right. But then I noticed something. Not only did it exceed the bandwidth of the subdomains but it was roughly equal to the total over all subdomains - plus a little extra.

In other words CPanel is counting all the bandwidth from each subdomain into the main domain and then adding them all up again for the total usage. So everything in the subdomains is counted twice!

The same appears to be the case in WHM.

Has anyone else come across this?

I've lifted the limit in WHM so that the nasty "Bandwidth exceeded" message went away, but I can't help wondering how many others have been tripped up by this.
 

itzmiko

Registered
May 3, 2007
4
0
151
seeing the same thing on customer accounts across multiple servers.

example:
domain.com 8.82 Gig
sub.domain.com 8.77 Gig

The domain and subdomain appear to be nearly mirroring each others bandwidth. This bandwidth usage was not like this a day or two ago

customers bandwidth counts are essentially doubling
 

jaytyn1

Registered
Feb 19, 2010
1
0
51
I am getting the same error.
Only started a few days ago, presumably from a recent cPanel update.

Can we report the bug to the developers?
 

mattcampbell

Member
Sep 7, 2006
16
0
151
I too are seeing the same thing, but with addon domains (which given they are linked to a subdomain on cpanel is not suprising). The bandwidth stats are double counting.

Today I got a bunch of bandwidth exceeded emails in a batch so this must have been caused by a recent update.
 

bartdc

Member
May 17, 2006
16
0
151
Same problem here. None of the measured bandwidths are correct.

I'm following the stable releases and notices following in the change log:
Stable 43471 2010-02-18 17:37:53 : Corrected bandwidth summary calculation and fixup of older summaries
Is this related? Does it mean the stats will be corrected after tonight?
 

mattcampbell

Member
Sep 7, 2006
16
0
151
Thanks for the pickup.

As it is still in the same build tree it should update overnight.

In the meantime I have disabled account suspensions.
 

mattcampbell

Member
Sep 7, 2006
16
0
151
Just updated to 43471. Problem not fixed immediatly.

Will wait until bandwidth stats are processed (every 12 hours) and report back whether issue resolved.
 

eastitaly

Member
Feb 18, 2010
6
0
51
the problem will not be solved after the bw processing, at least on cPanel 11.25.0-R43471 (RELEASE tree)

Funny that this release isn't listed in WHM's changelog, btw. :(
 

rainboy

Active Member
Mar 2, 2004
34
3
158
Eindhoven
I do wonder how a huge bug like this could be added to a stable release ? has this not been tested ? I was and always been under the impression that these changes only go to stable if it has been tested and approved.

I have several customer which have been automatic suspended; not a very happy camper today and nor are the suspended customers.
 

cPanelNick

Administrator
Staff member
Mar 9, 2015
3,481
35
208
cPanel Access Level
DataCenter Provider
Hi rainboy.

Unfortunately the problem did not appear in testing because it required the subdomain to do significantly more bandwidth then the main domain for the problem to be apparent. We have added this test case to our test suite to ensure the problem never occurs again. Right now this is a top priority case, and we expect to release 43472+ shortly to correct the issue.
 

mattcampbell

Member
Sep 7, 2006
16
0
151
Nick,

When this happened to us, I immediately went into Tweak Settings and checked the option 'Disable Suspending Accounts'. However accounts continued to stay suspended.

Is this a bug or does it need to wait until the next bandwidth stats run before they are unsuspended? I thought it would be happen immediately.

Consequently the only way to avoid suspension has been to give unlimited bandwidth limits.

Appreciate your reply.

Matt
 

cPanelNick

Administrator
Staff member
Mar 9, 2015
3,481
35
208
cPanel Access Level
DataCenter Provider
Nick,

When this happened to us, I immediately went into Tweak Settings and checked the option 'Disable Suspending Accounts'. However accounts continued to stay suspended.

Is this a bug or does it need to wait until the next bandwidth stats run before they are unsuspended? I thought it would be happen immediately.

Consequently the only way to avoid suspension has been to give unlimited bandwidth limits.

Appreciate your reply.

Matt
Correction:

They should be unsuspended automatically (I just tested this and it functioned as documented). You can force them to unsuspend in the
"Unsuspend Bandwidth Exceeders" function.

If the problem is persisting, could you see if there are any files in /var/cpanel/bwlimited?
 

mattcampbell

Member
Sep 7, 2006
16
0
151
Edited in for above correction:

So you mean we have to continually go in an unsuspend bandwidth exceeders every 12 hours (or however often bandwidth stats run)?

There is no way to turn of bandwidth suspending alltogether?
 
Last edited:

cPanelNick

Administrator
Staff member
Mar 9, 2015
3,481
35
208
cPanel Access Level
DataCenter Provider
Did that then changed one account back to there original limit (below the current reported usage) and status came back DISABLED and sure enough the site was suspended.

So is this another bug?
If you manually set the the limit lower then the current calculated bandwidth it will resuspend the site. The Disable Suspending Accounts option only stops the automatic suspension of sites. Since thats probably not how most people want this to work, I have opened a case to reexamine this behavior.

You can still force them to unsuspend in the "Unsuspend Bandwidth Exceeders" function.
 

mattcampbell

Member
Sep 7, 2006
16
0
151
Nick,

Sorry with all the edits to your post not sure what order I should be doing things now.

The option in Tweak settings is ticked.

Reduced the limit of one account below reported (because I put it at unlimited to overcome reported issued in this thread).

I issued the killall -TERM cpanellogd. And restarted cpanellogd (probably not necessary now)

Then clicked unsuspend bandwidth exceeders.

The question is will I now have to do this everytime or will it automatically stop suspension if I don't change the limit again?
 
Last edited: