Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Apache as proxy - keeping persistent connections

690 views
Skip to first unread message

Pete Verdon

unread,
May 20, 2008, 10:54:44 AM5/20/08
to
Hi,

I'm testing a system which uses a protocol of its own built on top of HTTP. It
is supposed to work through an Apache server configured as a proxy. For better
or worse, the application protocol requires that a sequence of HTTP requests
take place on a single TCP connection - this isn't something I can change.
However, I am having difficulty because the Apache proxy is splitting the
requests across multiple connections - fine for normal Web serving but fatal to
the application I am required to test.

This is the topology I am using:
:
+-----+1.11 1.12+----:---+2.10 2.11+-----+
| App |===========| Pro:xy |===========| App |
+-----+ 80+----:---+ 80+-----+
:
(upper numbers are last two octets of IP, lower numbers are ports)

These are the relevant (as far as I'm aware) directives from httpd.conf:

Timeout 120
KeepAlive On
MaxKeepAliveRequests 5000
KeepAliveTimeout 43200

<IfModule prefork.c>
StartServers 8
MinSpareServers 5
MaxSpareServers 20
ServerLimit 256
MaxClients 256
MaxRequestsPerChild 4000
</IfModule>
(and httpd -l shows prefork rather than worker)

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

ProxyRequests On
<Proxy *>
</Proxy>

Any suggestions on why Apache isn't keeping the connections open? Before testing
the version under development, I'm setting the test up against the "current
release" version of the application - which is known to have worked in this
configuration (though possibly on an older Apache).

Thanks for your help,

Pete

Phil

unread,
May 20, 2008, 11:16:21 AM5/20/08
to

The ProxyPass directive has various parameters that influence how long
the connections are kept open for:
http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypass see e.g.
max, smax and ttl.

The Apache Users mailing list might be a good place to ask about this.
But expect to be told that your application is broken.


Phil.

Pete Verdon

unread,
May 20, 2008, 11:21:51 AM5/20/08
to
Phil wrote:

> Pete Verdon wrote:
>> For better or worse, the application protocol requires that a
>> sequence of HTTP requests take place on a single TCP connection - this
>> isn't something I can change.

> The ProxyPass directive has various parameters that influence how long the connections are kept open for:
...


> But expect to be told that your application is broken.

You might think this; I couldn't possibly comment :-)

It's a long-standing application, in a commercial setting. The chance of any
effort being assigned to modify it in this way, when it apparently works under
normal circumstances, is slim-to-none.

I'll try using ProxyPass and report back - thanks.

Pete

Pete Verdon

unread,
May 20, 2008, 11:35:49 AM5/20/08
to
Pete Verdon wrote:

> I'll try using ProxyPass and report back - thanks.

Thanks, Phil - this seems to have fixed the problem.

Pete

0 new messages