Wrong Bandwidth Calculation

After upgrading to 3.72 the bandwidth for only one website raised from max 2GB last month to 870GB for the last 3 days.

The whole bandwidth appears to be mail transfers, but there is no difference at mails/minute this week.

Also I checked the bandwidth on my router and the bytes transfered are far far below that number.

I also checked /var/log/maillog and there are only few lines fro this domain.

I recaclulated the bandwidth for this domain and it corrected the number for Saturday from 300GB to 676KB!!!! so the bandwidth dropped to 570GB.

Duling the last 2 minutes I'm writing this message the bandwidth raised from 570GB to 606GB (that is 36GB in 2 minutes) something impossible for my connection.

Status: 
Closed (fixed)

Comments

Yeah, there is indeed a bug that's causing Virtualmin to over-count the mail stats.

That is fixed, and will be corrected in the next version.

I'll forward this to Jamie in case he has addition comments.

Also, if you want a check fix, replace the file /usr/libexec/webmin/virtual-server/feature-mail.pl with the one attached to this bug report, run /etc/webmin/restart , then re-compute bandwidth usage.

Unfortunately this bug only happens when clients are using POP3 to download mail, which is rarely used compared to IMAP ..

Thanks for the patch. BTW: Look for feature-mail.pl in /usr/share/webmin/virtual-server/feature-mail.pl, not /usr/libexec/...

I'm sure glad I found this bug report. I was investigating why some of my virtual site bandwidth reports all of a sudden went through the roof.

I found feature-mail.pl in /usr/libexec/webmin/virtual-server/ as originally suggested and not in /usr/share/webmin/virtual-server/.

However, I'm not seeing corrected stats now after re-generating bandwidth statistics.

Do you mean the stats are still wrong, or you don't see any stats at all?

The stats are there, just unchanged. I have a dozen or so sites out of a couple hundred that over the last few days are registering high GB amounts of email usage. These are all sites that would normally be in the MB's for 30 days.

webwzrd - did you use the "Re-Compute Bandwidth Statistics" page to re-compute stats from a date before you started seeing the incorrect stats.

No, I did it from today's date. Am I now understanding correctly that I should use a pre-issue date and then next time the calculations are done on their own, I'll be caught up without the error?

Brian

Okay, I'm good now. I re-computed from the 12th and got the expected lower results. I then re-computed from yesterdays date and everything looks normal.

Thank you very much Jamie.

Brian

Yes, that's the right way to do it..

FWIW, I think this should be considered a critical bug fix to be implemented ASAP in a new Virtualmin release. We have already had a few domains automatically disabled as a result of the incorrect bandwidth usage. Most users will not be savvy enough to find this bug report and apply the fix manually.

We are looking into doing a minor version, or just accelerating the 3.73 version release..

Okay, thanks. BTW, I just noticed a related bug. I have the option set in bandwidth monitoring to re-enable any disabled servers that fall back below the bandwidth limit. The domains were automatically disabled got re-enabled after implementing the fix above, however any sub-domains were not automatically re-enabled. The weird thing is that the web sites for those sub-domains were working (not sure about e-mail accounts though), but Virtualmin still showed them as being disabled. I manually re-enabled them in Virtualmin, and everything seems to be fine now.

Hi we have this problem too but this patch doesn't seem to fix it. I too would love to get this fixed asap.

We are using Debian Lenny

On webmin restart we get this error:-

Bareword found where operator expected at /usr/share/webmin/virtual-server/feature-mail.pl line 3019, near "local" (Might be a runaway multi-line ll string starting on line 3018) Pre-loaded virtual-server/feature-mail.pl in virtual_server

Then when I got to the bandwidth page I get: HTTP/1.0 500 Perl execution failed Server: MiniServ/0.01 Date: Sun, 23 Aug 2009 12:14:39 GMT Content-type: text/html Connection: close Error - Perl execution failed

Undefined subroutine &virtual_server::get_mail_log called at /usr/share/webmin/virtual-server/edit_newbw.cgi line 126.

gregc - that looks like a different error. Which feature-mail.pl file did you use? It may have been incompletely downloaded .. it should be 4485 lines long.

Hi Jamie,

Yes you are right. The download was incomplete. No errors and bandwidth graphs look correct now.

Thank you.

Automatically closed -- issue fixed for 2 weeks with no activity.