Page 1 of 1

Quota overrides schedule settings

Posted: November 30th, 2021, 9:04 pm
by doomedtx
I was running close to my internet limit and just accidentally pushed myself over, partially due to my misconfiguration, and partially because SABnzbd behaved differently than expected. I'm running 3.4.0 on a QNAP NAS.

Although the QNAP is set to local time, it's a linux server and runs off UTC. I have my schedule set to pause at 1100 (daylight saving)/1200 (normal) UTC to equate to 0700 US Eastern Time and resume at 0300/0400 to equal 2300 US Eastern Time.

The first issue was in my configuration. I have the quota set to recycle on day 1, which I mistakenly assumed was using local calendar day even though I know the scheduler uses UTC. That means the quota can reset as early as 1900L when it's still the last day of the month to my ISP. Apparently I've had this set wrong for years and only just noticed it.

The other issue that surprised me was that pausing for quota overrides the schedule settings. I was awake early today and added some files at about 0900 UTC. At 0924 UTC, it reached the quota and paused downloads. I expected it to stay paused when reaching the daily 1200 UTC pause command and remain paused until the daily 0400 resume command. Instead, at 0000 UTC, SAB reset the quota and immediately resumed downloading 4 hours early.

Fortunately it's only a $10 mistake this time, but I'm trying to avoid overages in the future. To be sure the quota doesn't recycle before midnight local, I've changed it to day 2. That should prevent it from starting up before the ISP rolls over to the next month. I'm also reducing my overall quota because it seems allocating 1/3 of our allowable usage to SAB isn't allowing enough data for everything else we use.

I wouldn't call the quota superseding the schedule a bug; it's just a design parameter I didn't realize until today.

Re: Quota overrides schedule settings

Posted: December 1st, 2021, 5:50 am
by safihre
Indeed, that's by design.
Otherwise it would be very complicated to take into account when executing schedulers to also check quota.

Re: Quota overrides schedule settings

Posted: December 1st, 2021, 7:07 am
by jcfp
doomedtx wrote: November 30th, 2021, 9:04 pmAlthough the QNAP is set to local time, it's a linux server and runs off UTC.
While not a sabnzbd issue, you should look into fixing the time and/or timezone settings of the nas system. Unix system may store the bios time (system clock) in utc by default, but that doesn't stop them from properly displaying and working with the time of your timezone.

Re: Quota overrides schedule settings

Posted: February 12th, 2022, 12:06 am
by doomedtx
safihre wrote: December 1st, 2021, 5:50 am Indeed, that's by design.
Otherwise it would be very complicated to take into account when executing schedulers to also check quota.
Right, but it's doing the opposite here. Not taking schedules into account when resetting the quota. I understand if it's too complicated to check both, I just wish the scheduler had priority over the quota reset. I don't ever want my downloads to start 4-5 hours early depending on UTC offset; but that might be related to the fact that I've been running SAB in UTC instead of local time. Perhaps if I figured out how to make the SAB install work in local time, that would solve this issue too. It hasn't been a problem in the past because I'm comfortable working in UTC. Also, I've apparently never been so close on my quota that the reset pushed me over the ISP limit. Changing the quota reset to day 2 (since I didn't see I could specify a reset time) has resolved the issue for now.

EDIT: apologies for the late replies. I thought I subscribed to this issue, but apparently I didn't. Thanks for initially replying quickly, both of you.

Re: Quota overrides schedule settings

Posted: February 12th, 2022, 12:09 am
by doomedtx
jcfp wrote: December 1st, 2021, 7:07 am
doomedtx wrote: November 30th, 2021, 9:04 pmAlthough the QNAP is set to local time, it's a linux server and runs off UTC.
While not a sabnzbd issue, you should look into fixing the time and/or timezone settings of the nas system. Unix system may store the bios time (system clock) in utc by default, but that doesn't stop them from properly displaying and working with the time of your timezone.
I understand what you're saying, and maybe I didn't make it clear in my OP. The NAS time zone is properly configured to US Eastern Time and displays apps and its web page in local. However, the SAB installation doesn't display local time, only UTC. Perhaps there's a setting somewhere in the NAS or SAB settings that will allow it to work in local time. As I said above, it hasn't been an issue before, but now I will go looking for it. Thanks for trying to help out.