I have the following code:
my $ip = $ENV{"REMOTE_ADDR"};
my $throttler = Data::Throttler->new(
max_items => 40, # 40 downloads every
interval => 7200, # 2 hours
db_file => "/tmp/throttle.dat",
);
$no_throttle = $throttler->try_push( key => $ip );
however it seems after running the script for some time, it is
miscalculating. for example I hit the script about 10 times today after
not using it for some days and I seem to be already throttled.
I'm not sure how to debug this.