Why my mod_throttle doesn't work

pkilam

Verified User
Joined
Oct 27, 2004
Messages
115
I have followed the howto to install mod_throttle on my server.

However, it seems it did not work as expected. I have tried to create a policy to limit the transfer rate to 30k/sec, however i can still download a file through http at 6xxk/sec.

I have also tried to limit the number of request per sec, and it also didn't work.

Even my http://testing.xxx.com/throttle-me showing the correct stat, but it seems mod-throttle did not try to block any traffic /request when a policy is violated.


Anyone know what i may have missed???

thanks in advance

Following is the stat:

testing.xxx.com Server Uptime 19.58 Throttle Status
% Hits Refused KBytes
sent KBytes
per hit Delay
(<=0) Policy Limit Period Period
Elapsed Idle
Time
1. www.testing.xxx.com 5230 2 1 1569 784 40 Speed 30 1s 4:26.52 20.52


Following is the config. i added to my httpd.conf:

<IfModule mod_throttle.c>
ThrottlePolicy none

<Location /throttle-status>
SetHandler throttle-status
</Location>

<Location /throttle-me>
SetHandler throttle-me
</Location>

<Location /~*/throttle-me>
SetHandler throttle-me
</Location>
</IfModule>


and i added the following to my virtual host section:

<IfModule mod_throttle.c>
ThrottlePolicy Speed 30K 1s
</IfModule>
<Location /throttle-me>
SetHandler throttle-me
</Location>:confused: :confused:
 
if i remember right you have to put in b/s instead of 30k, but i am not sure, been a long time since i used it
 
I use mod_throttle for volume-limiting and mod_bandwidth for speed-throttling.

A couple thoughts:

1. IIRC, mod_throttle throttles by delaying subsequent requests, so if your file is all downloaded in one request, it goes through at full speed.

2. You don't need the "k" in "30k". Just use "30".
 
Last edited:
I'd like to know this too... I assume this discussion only applies to apache.

Has anyone limited

apache, ftp, & email ?
 
Back
Top