Over traffic notifications are not working properly

Discussion in 'General' started by Planea, Mar 26, 2024.

  1. Planea

    Planea New Member

    For some time now I have been receiving overrun traffic notifications on a daily basis.

    Checking a few days ago the configuration in System > Server config > Web I see that I have notifications sent for admin and customers every 7 days, but the notifications are arriving daily.

    I changed the configuration to 0 (send message just once, no repeated messages) but the mail to admin is still arriving daily.

    Does the send every X days setting affect both customers and admin accounts, or only the customer?

    I'm working with version 3.2.11p1 I have not yet upgraded to 3.2.11p2

    Screenshot 2024-03-26 at 09-05-28 Planea - ISP01 ISPConfig.png
  2. pyte

    pyte Well-Known Member HowtoForge Supporter

    Yes. It's the same setting for customer, reseller and admin. You can check the field "last_quota_notification" in web_domain to see if that field might not be set correctly.
  3. Planea

    Planea New Member

    The content of the column is indeed NULL.
    The mail is sent but not saved in the database.
    Any clue where I can start debugging the problem? do you know the path or the name of the function that checks the quota?
  4. pyte

    pyte Well-Known Member HowtoForge Supporter

    I don't now why the field is not getting set after sending the mails in you case. The file doing that stuff is server/lib/classes/cron.d/300-quota_notify.inc.php
  5. variable99

    variable99 Member HowtoForge Supporter

    Can confirm, for me it is also NULL.
  6. Planea

    Planea New Member

    I don't seem to be calculating my quota correctly.
    232                                         // send notifications only if the website is over the quota threshold
    233                                         if($used_ratio <= $web_config['overquota_notify_threshold'] / 100) {
    234                                                 // reset notification date
    235                                                 if($rec['last_quota_notification']) $app->db->query("UPDATE web_domain SET last_quota_notification=null WHERE domain_id=?", $rec['domain_id']);
    237                                                 // send notification - everything ok again
    This is happening on I think all 5 single server installations I have of ISPConfig.

    Could it be a bug, is it happening to anyone else besides @variable99 ?
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    I have no issues on any of my servers with receiving wrong notifications.

    That's fine; as you can see in the code, it must be null when the condition that triggers the notification has been rectified, e.g., by increasing the limit or disabling the limit by setting it to -1.

    He just confirmed that the value is null in his database, which is fine as it just means that there is currently no over quota condition that the user has been notified about already on his system.
    ahrasis likes this.
  8. variable99

    variable99 Member HowtoForge Supporter

    I have one test website where I set traffic quota to 1 MB yesterday and today it is disabled (as per my settings, it is fine). Can it be that when traffic limit is overused by X percentage system does not send warning and just suspends website? I mean my warning limits are 90% and overuse is like 500 MB where limit was 1 MB.
  9. Planea

    Planea New Member

    In reviewing this a little further, I realised that the code I was reviewing is website space quota and website traffic that is causing me problems.

    Is there no way to reduce the traffic exceeded notification? Like only sending it on the first day the traffic is exceeded or every X days like you do with quotas?

Share This Page