<div dir="ltr">Hey Venkatesh,<br><br>
<div class="gmail_quote">On Fri, Oct 31, 2008 at 2:26 AM, Venkatesh K <span dir="ltr"><<a href="mailto:kaevee@gmail.com">kaevee@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">2008/10/31 <<a href="mailto:tnt@kalik.net">tnt@kalik.net</a>>:<br>
<div class="Ih2E3d">> It does make sense. rlm_sqlcounterworks like this toward the time of the<br>> reset: lets say you have an hour left, your limit is 20 hours and you<br>> have signed in 15 minutes before counter reset time. When code<br>
> calculates that you can be online at reset time it doesn't return your<br>> allowance (1 hour) but adds the limit for the next conting period (20<br>> hours) to the remaining time (15 minutes) and returns that value (20<br>
> hours and 15 minutes). Reasoning is that your session shouldn't be<br>> discontinued after an hour becouse 15 minutes into the session new limit<br>> should come into force (and session limit can't be changed during the<br>
> session).<br>><br>> In your case there is about 2,000,000 left on the counter but only a few<br>> thousand seconds left to the end of the reset period, so code will add<br>> those few thousands to the next period limit (26,000,000) and return<br>
> that value. Code doesn't "know" are you counting data or time as<br>> there is no such configuration item.<br>><br>> Venkatesh had posted the patch that switches off this peace of code for<br>
> data counters by introducing that configuration item. You should try it.<br><br></div>rlm_sqlcounter has one more limitation. In version 1.1.7, the maximum<br>counter value was limited to <2G whereas in 2.1.1 it seems to be <4G.<br>
This imposes an artificial limitation of maximum of 4GB of downloads.<br>I had a workaround where I patched rlm_sqlcounter to limit the per<br>session downloads to 4GB if allowed usage exceeds 4GB.<br><br>Except this issue, I think, with the patch I posted earlier, one<br>
should be fine with rlm_sqlcounter. If someone needs a patch to work<br>around the 2GB/4GB limit, I will post the patch.<br></blockquote>
<div> </div>
<div>Sorry for the late reply.</div>
<div>I applied your patch and now data counters work as expected with a minor exception, the 2Gb limit</div>
<div>as you have stated previously. Possibly you could also post the patch for the 2Gb/4Gb limit?</div>
<div>I'm hoping it's compatible with FR 1.1.7 as well.</div>
<div> </div>
<div>Thanks,</div>
<div>Liran.</div></div></div>