setquota: Not setting block grace time on because softlimit is not exceeded

Discussion in 'Installation/Configuration' started by vaio1, Oct 24, 2012.

  1. vaio1

    vaio1 ISPConfig Developer ISPConfig Developer

    Hi guys,

    I have discovered that some clients in my host have exceeded the limit set for the traffic but ISPConfig doesn't block them.

    In the meanwhile I have seen in the system log this message:

    setquota: Not setting block grace time on /dev/disk/by-uuid/5376739d-9145-48f8-bf8a-f583671aea20 because softlimit is not exceeded.

    So I have tried to debug the cron php code and I have found an error in the traffic quota calculation. This is the snipped code that I have get from the cron_daily.php

    Line: 434
    $web_traffic = (int)$tmp['total_traffic_bytes']/1024/1024;

    traffic_quota: 12000
    total_traffic: 17228142008
    web_traffic: 2047.9999990463 :confused:

    In this situation the user will be not Blocked by the server for the quota exceeded!

    change it in:

    $web_traffic = round($tmp['total_traffic_bytes']/1024/1024);

    traffic_quota: 12000
    total_traffic: 17218633650
    web_traffic: 16421 :)

    this solve the problem.

    Furthermore where have I to set the Traffic Quota Lock option in the administration panel?

    [sys_groupid] => 136
    [domain_id] => 3847
    [domain] =>
    [traffic_quota] => 12000
    [traffic_quota_lock] => n

    At the end I have discovered that if I disable a website ticking off the active option checkbox the websites don't go offline.

    Last edited: Oct 24, 2012
  2. falko

    falko Super Moderator ISPConfig Developer

    I've added this to our bugtracker, so we will check that.
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    You mix up a few things here, setquota is for harddisk quota and not related to traffic quota in any way.

    Regarding the web traffic calculation, we will check that.

    Nowhere, this is a internal setting of the traffic quota system and not to be changed manually.

    Off course, if the website is disabled, it does not make any sense to disable it twice. Or how shall be a website become more offline when it is already offline.

Share This Page