httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chirouze Olivier" <>
Subject [users@httpd] Trying to limit connections per virtual host with mod_cband
Date Fri, 09 Feb 2007 16:08:08 GMT

I'm trying to use mod_cband... but can't manage to!

I've tailed down my conf file to the most simple case with just one
virtual host.
What I'm trying to achieve is quite simple: I just want to limit the
number of concurrent connections per virtual host (a "MaxClient" at the
virtualhost level) and I think this is one of the many features of

How do I test this? Just call multiple times a page that takes very long
to anwser: during all this time, for each click, a connection on this
virtual host stays open on Apache. (thanks a lot to Georgi
Chorbadzhiyski for pointing me to /status?notable that proves the
connections are open on the right virtual host).

The thing is, on cband-status, I see some rps used, but never a single
connection! (thanks to cband status page: /cband-status). "Current
connection" always stays at 0. And, in fact, the limit is never used. I
set it to 2 and can have more than 10 concurrent connections. So, in a
word, it doesn't work as expected.

However, I see some "remote client", but always one. The virtual host is
correct, but "Connections Limit/Current" always says "1/0". I don't
understand how a line can be here with zero connection?

I'm kind of lost after looking around for days and trying all I can
think of (simplifying the config file, unactivating modules, changing
order of LoadModule, using OpenSta, etc...)

I'm using mod_rewrite and mod_proxy and I think that might be the pb.
But there is an example with mod_rewrite on cband homepage so I suppose
there is no incompatibility!

Please... Help ;-)


I&0 Infrastructure

The conf file:

ServerRoot /data/apache/httpd-test1

# This only contains standard httpd.conf file with the following modules
#LoadModule access_module modules/
#LoadModule log_config_module modules/
#LoadModule logio_module modules/
#LoadModule env_module modules/
#LoadModule setenvif_module modules/
#LoadModule ssl_module modules/
#LoadModule mime_module modules/
#LoadModule status_module modules/
#LoadModule negotiation_module modules/
#LoadModule dir_module modules/
#LoadModule alias_module modules/
Include /data/apache/httpd-test1/appli-apache/conf/httpd_solaris28.conf


User apache
Group apache

DocumentRoot "/data/apache/httpd-test1/htdocs"


LoadModule cband_module choucroutemodules/

LoadModule proxy_module modules/

LoadModule proxy_http_module modules/

CustomLog /logs/apache/httpd-test1/logs/rproxy_log "%{Host}i |%{RULE}e|
%{%H/%T}t %h -> %{SERVER}e URL: %U"

UseCanonicalName Off

	<Location /status>
		SetHandler server-status
		Order deny,allow
		Allow from all
	<Location /info>
	    SetHandler server-info

LoadModule rewrite_module     modules/

RewriteEngine on
RewriteLog	/logs/apache/httpd-test1/logs/rewrite_log
RewriteLogLevel 0

LogLevel debug


<IfModule mod_cband.c>
	<Location /cband-status>
		SetHandler cband-status
		Order deny,allow
		Allow from all
	<Location /cband-status-me>
		SetHandler cband-status-me
		Order deny,allow
		Allow from all

<IfModule mod_cband.c>
        CBandSpeed 0 0 10
	CBandScoreFlushPeriod 1
	CBandRandomPulse On


<IfModule mod_cband.c>
        CBandRemoteSpeed 0 3 1
        CBandSpeed 0 0 2
        CBandDefaultExceededCode 503
        CBandScoreboard /tmp/apache/scoreboard
        CBandPeriod 2s

RewriteEngine   on
RewriteLog      /logs/apache/httpd-test1/logs/rewrite_log
RewriteLogLevel 3
Include         conf/deny_patterns.conf

RewriteRule     ^/(.*)$$1 [P]

ProxyRequests   off

KeepAlive Off


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message