You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Christian Folini <ch...@post.ch> on 2008/02/01 13:56:35 UTC

[users@httpd] 2.2 proxy connection pool gone missing (?)

Hi there,

I am setting up an apache 2.2 reverse proxy, that should use
a connection pool to connect to the backend. Unfortunately,
there is no connection pool in sight anywhere.

On bugzilla, there are some issues with this connection pooling,
but I understand this should not affect me in the most simple
setup. Still I am not getting this to work, so there must be
some flaw in my configuration, but I can not seem to find it.

I am working on debian (sarge!) with a custom compile apache 
2.2.8, worker mpm. The backend is a 2.2.6 prefork.

The boiled down rp config:

-----------------------------------------------------------------------
ServerRoot		/data/custom-apaches/apache-2.2.8-worker
User			www-data
Group			www-data

ServerTokens		Prod
ServerSignature		Off
UseCanonicalName	On
TraceEnable		Off
HostnameLookups		Off

PidFile			logs/httpd.pid
LockFile		logs/httpd.lock

KeepAlive		On
KeepAliveTimeout	10
MaxKeepAliveRequests	100
MaxClients		150

Listen 80

LoadModule proxy_module		modules/mod_proxy.so
LoadModule proxy_http_module	modules/mod_proxy_http.so

LogLevel		debug
ErrorLog		logs/error.log

ProxyPass / http://backend-host/ min=5
-----------------------------------------------------------------------

The mod_proxy documentation states:
"Setting min will determine how many connections will always be 
open to the backend server." 

Now when I start the reverse proxy, there is no connection to the
backend. Tcpdump does not show me anything. Netstat remains empty
for the destination in question.

I enabled mod_status, but it did not show me anything either.
(Not sure it would, though.)

My error.log shows the following:
[Fri Feb 01 13:36:32 2008] [notice] Apache/2.2.8 (Unix) configured -- resuming normal operations
[Fri Feb 01 13:36:32 2008] [info] Server built: Feb  1 2008 13:09:30
[Fri Feb 01 13:36:32 2008] [debug] worker.c(1740): AcceptMutex: sysvsem (default: sysvsem)
[Fri Feb 01 13:36:32 2008] [debug] proxy_util.c(1670): proxy: grabbed scoreboard slot 0 in child 16517 for worker http://backend-host/
[Fri Feb 01 13:36:32 2008] [debug] proxy_util.c(1761): proxy: initialized worker 0 in child 16517 for (backend-host) min=5 max=25 smax=25
[Fri Feb 01 13:36:32 2008] [debug] proxy_util.c(1670): proxy: grabbed scoreboard slot 1 in child 16517 for worker proxy:reverse
[Fri Feb 01 13:36:32 2008] [debug] proxy_util.c(1761): proxy: initialized worker 1 in child 16517 for (*) min=0 max=25 smax=25
[Fri Feb 01 13:36:32 2008] [debug] proxy_util.c(1670): proxy: grabbed scoreboard slot 0 in child 16516 for worker http://backend-host/
[Fri Feb 01 13:36:32 2008] [debug] proxy_util.c(1689): proxy: worker http://backend-host/ already initialized
[Fri Feb 01 13:36:32 2008] [debug] proxy_util.c(1761): proxy: initialized worker 0 in child 16516 for (backend-host) min=5 max=25 smax=25
[Fri Feb 01 13:36:32 2008] [debug] proxy_util.c(1670): proxy: grabbed scoreboard slot 1 in child 16516 for worker proxy:reverse
[Fri Feb 01 13:36:32 2008] [debug] proxy_util.c(1689): proxy: worker proxy:reverse already initialized
[Fri Feb 01 13:36:32 2008] [debug] proxy_util.c(1761): proxy: initialized worker 1 in child 16516 for (*) min=0 max=25 smax=25
[Fri Feb 01 13:36:32 2008] [debug] proxy_util.c(1670): proxy: grabbed scoreboard slot 0 in child 16519 for worker http://backend-host/
[Fri Feb 01 13:36:32 2008] [debug] proxy_util.c(1689): proxy: worker http://backend-host/ already initialized
[Fri Feb 01 13:36:32 2008] [debug] proxy_util.c(1761): proxy: initialized worker 0 in child 16519 for (backend-host) min=5 max=25 smax=25
[Fri Feb 01 13:36:32 2008] [debug] proxy_util.c(1670): proxy: grabbed scoreboard slot 1 in child 16519 for worker proxy:reverse
[Fri Feb 01 13:36:32 2008] [debug] proxy_util.c(1689): proxy: worker proxy:reverse already initialized
[Fri Feb 01 13:36:32 2008] [debug] proxy_util.c(1761): proxy: initialized worker 1 in child 16519 for (*) min=0 max=25 smax=25

I have no previous experience with this connection pooling, so I can't
tell if there is anything abnormal. Severity is all debug, so I guess
it's okay.

When I carry out a request, it works fine and the connection to the
backend remains open until the http keepalive expires.
Then the connection goes away again.

So where is the flaw? Any comment is appreciated.

regards,

Christian

-- 
Christian Folini, Swiss Post IT, Unix / Apache Engineering
+41 (0)58 338 79 96               christian.folini@post.ch

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] 2.2 proxy connection pool gone missing (?)

Posted by Christian Folini <ch...@post.ch>.
On Fri, Feb 01, 2008 at 02:43:13PM +0100, Axel-Stephane  SMORGRAV wrote:
> Hmmm. This made me think that there may not be any point in having a min for reverse proxy backends since it seems pretty pointless to initialise n connections that will be closed by the backend anyway 15 seconds later or whatever the backend's keepalive timeout is, if there is no activity on said connections... 

If I could get it to connect at all, I'd be happy with the close and
reopening after the keepalivetimeout expiry. (Is not it the basic timeout, 
actually?)
In fact, using an existing, preopened connection would save the tcp
handshake and optionally the more expensive ssl handshake. That is what 
I am after actually. But as mentioned in my previous message: even the 
most simple setup fails to work as advertised.

regs,

Christian

-- 
Christian Folini, Swiss Post IT, Unix / Apache Engineering
+41 (0)58 338 79 96               christian.folini@post.ch

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] 2.2 proxy connection pool gone missing (?)

Posted by Axel-Stephane SMORGRAV <Ax...@europe.adp.com>.
Hmmm. This made me think that there may not be any point in having a min for reverse proxy backends since it seems pretty pointless to initialise n connections that will be closed by the backend anyway 15 seconds later or whatever the backend's keepalive timeout is, if there is no activity on said connections... 

-ascs
 
-----Message d'origine-----
De : Christian Folini [mailto:christian.folini@post.ch] 
Envoyé : vendredi 1 février 2008 13:57
À : users@httpd.apache.org
Objet : [users@httpd] 2.2 proxy connection pool gone missing (?)

Hi there,

I am setting up an apache 2.2 reverse proxy, that should use
a connection pool to connect to the backend. Unfortunately,
there is no connection pool in sight anywhere.

On bugzilla, there are some issues with this connection pooling,
but I understand this should not affect me in the most simple
setup. Still I am not getting this to work, so there must be
some flaw in my configuration, but I can not seem to find it.

I am working on debian (sarge!) with a custom compile apache 
2.2.8, worker mpm. The backend is a 2.2.6 prefork.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org