Unblocking a site after traffic lock, but it gets blocked again next night

Discussion in 'Installation/Configuration' started by choong, Jul 5, 2020.

  1. choong

    choong New Member

    We have a website which has exceeded their traffic quota. As a result, the site gets disabled. However the next night when 300-
    quota_notify.inc.php runs again, the site gets disabled again.

    It is possible of course to increase the user's quota, but then we would have to remember to manually revert that change at the end of the month. Another alternative is to wipe out older records from web_traffic, but that seems too destructive - it would also mess with what the user sees in their dashboard.

    I am contemplating a functionality like:
    option a)
    - A possibility to temporarily increase a user's web traffic limit. But that needs to come with a cronjob then to automatically revert it back to their "normal" limit at the end of the month.

    option b)
    - If an admin enables a site which was previously disabled
    - And the site had traffic_quota_lock='y'
    - Then add an acknowledged='y' value to the web_traffic records for the current month. In the nightly cron, the SQL query would change to ignore the already acknowledged records (i.e. AND WHERE acknowledged != 'y')

    That would effectively reset the available quota for a website for that current month, when an admin re-enables a disabled website. Before we start on that change we would like to ask:

    1. Is there indeed no "clean" way to reset the traffic quota in ISPConfig 3 right now, or did I miss something?
    2. What do you think of the proposed changes?
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Traffic quota gets reset at the end of the month, resetting it in between would make it useless as it would be no quota anymore.
  3. choong

    choong New Member

    Should I interpret your answer as "there is no way to reset the quota in the middle of the month and we will not merge pull requests to implement that feature" then ?
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    I don't find it useful as it renders the quota useless, but others might like it. So if you want to implement this as a feature and commit the code, then I will merge it as long as this feature can be disabled under system > server config or system > Interface > main config.
  5. choong

    choong New Member

    Ok, thanks.

    Technically you are correct, yet we have a use case where we sometimes want to allow customers to exceed their quota for a month. Lets say they ran a successful advertisement campaign and have some extra traffic. As long as they are not doing anything abusive we want to allow them to exceed their quota as long as it doesn't happen every month. We could manually increase their limit, but do not want to write it on a post-it for example to restore their previous quota at the end of the month.

    Anyway, out of the listed options, is there an option which would be preferred ?
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    I guess system > interface > main config should be fine, That way, it will be the same setting for all servers in a multiserver setup, using system > server config would mean that the option can be set per server, which is probably not necessary.

Share This Page