You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Alessandro Vernet <av...@scdi.org> on 2010/07/06 21:10:24 UTC

[users@httpd] mod_proxy: ProxyPass max parameter has no effect

I am using the following Apache config to forward requests to a Tomcat server:

    ProxyPass /myapp ajp://localhost:8009/myapp max=2

This is a simplified config, but is enough to reproduce the issue,
which is that the max parameter has no effect. If I through 10
concurrent requests to Apache, all 10 are forwarded to Tomcat at the
same time, while I would like to have them forwarded 2 by 2. Should I
use something other than the max parameter for this?

Alex
-- 
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet

---------------------------------------------------------------------
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] mod_proxy: ProxyPass max parameter has no effect

Posted by Jeff Trawick <tr...@gmail.com>.
On Thu, Jul 15, 2010 at 2:26 PM, Alessandro Vernet <av...@scdi.org> wrote:
> Jeff,
>
> On Thu, Jul 15, 2010 at 10:53 AM, Jeff Trawick <tr...@gmail.com> wrote:
>> AFAIK the only thing you can do with prefork to avoid overrunning the
>> backend is to set MaxClients no higher than the maximum number of
>> backend connections.  But that's useless when you expect httpd to
>> forward only a subset of requests to the backend.
>
> And even if all the requests go to backend servers, that wouldn't
> satisfy the requirement of "max per back-end server", MaxClients would
> only be a "overall max". (I.e. if I have 4 back-end servers, and want
> 4 max concurrent connections per server, I could set MaxClients to 16,
> but Apache could at some point in time send more than 4 concurrent
> connection to a given back-end server.)

oh, right

>
>> Upcoming httpd 2.4 has loadable MPMs that can be switched out just
>> like regular modules.  I hope that vendors provide 2-3 MPMs on Unix,
>> with a switch as easy as changing the LoadModule directive and
>> checking the default config for the new MPM.
>>
>> But yes, until then this may be a pain to change.
>
> Then I'm looking forward to 2.4!
>
> Alex
> --
> Orbeon Forms - Web forms, open-source, for the Enterprise -
> http://www.orbeon.com/
> My Twitter: http://twitter.com/avernet
>
> ---------------------------------------------------------------------
> 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
>
>



-- 
Born in Roswell... married an alien...

---------------------------------------------------------------------
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] mod_proxy: ProxyPass max parameter has no effect

Posted by Alessandro Vernet <av...@scdi.org>.
Jeff,

On Thu, Jul 15, 2010 at 10:53 AM, Jeff Trawick <tr...@gmail.com> wrote:
> AFAIK the only thing you can do with prefork to avoid overrunning the
> backend is to set MaxClients no higher than the maximum number of
> backend connections.  But that's useless when you expect httpd to
> forward only a subset of requests to the backend.

And even if all the requests go to backend servers, that wouldn't
satisfy the requirement of "max per back-end server", MaxClients would
only be a "overall max". (I.e. if I have 4 back-end servers, and want
4 max concurrent connections per server, I could set MaxClients to 16,
but Apache could at some point in time send more than 4 concurrent
connection to a given back-end server.)

> Upcoming httpd 2.4 has loadable MPMs that can be switched out just
> like regular modules.  I hope that vendors provide 2-3 MPMs on Unix,
> with a switch as easy as changing the LoadModule directive and
> checking the default config for the new MPM.
>
> But yes, until then this may be a pain to change.

Then I'm looking forward to 2.4!

Alex
-- 
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet

---------------------------------------------------------------------
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] mod_proxy: ProxyPass max parameter has no effect

Posted by Jeff Trawick <tr...@gmail.com>.
On Thu, Jul 15, 2010 at 12:46 PM, Alessandro Vernet <av...@scdi.org> wrote:
> Jeff,
>
> On Thu, Jul 15, 2010 at 5:53 AM, Jeff Trawick <tr...@gmail.com> wrote:
>>> Does this sound about right?
>>
>> worker or event
>> ThreadsPerChild == MaxClients (and may as well set ServerLimit to 1)
>>
>> One child process is the simplest/most obvious case.  I think it will
>> still work close enough to the desired goal if you have 2-3 child
>> processes which share the workload and connection quota.
>
> Thank you for the precisions, this is very useful information. For
> folks on UNIX who have a prefork MPM and can't easily change to an
> worker or event MPM, do you know of an alternative way to achieve the
> same result? Or should they just bite the bullet, and switch to a
> worker or event MPM?

AFAIK the only thing you can do with prefork to avoid overrunning the
backend is to set MaxClients no higher than the maximum number of
backend connections.  But that's useless when you expect httpd to
forward only a subset of requests to the backend.

Upcoming httpd 2.4 has loadable MPMs that can be switched out just
like regular modules.  I hope that vendors provide 2-3 MPMs on Unix,
with a switch as easy as changing the LoadModule directive and
checking the default config for the new MPM.

But yes, until then this may be a pain to change.

---------------------------------------------------------------------
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] mod_proxy: ProxyPass max parameter has no effect

Posted by Alessandro Vernet <av...@scdi.org>.
Jeff,

On Thu, Jul 15, 2010 at 5:53 AM, Jeff Trawick <tr...@gmail.com> wrote:
>> Does this sound about right?
>
> worker or event
> ThreadsPerChild == MaxClients (and may as well set ServerLimit to 1)
>
> One child process is the simplest/most obvious case.  I think it will
> still work close enough to the desired goal if you have 2-3 child
> processes which share the workload and connection quota.

Thank you for the precisions, this is very useful information. For
folks on UNIX who have a prefork MPM and can't easily change to an
worker or event MPM, do you know of an alternative way to achieve the
same result? Or should they just bite the bullet, and switch to a
worker or event MPM?

Alex
-- 
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet

---------------------------------------------------------------------
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] mod_proxy: ProxyPass max parameter has no effect

Posted by Jeff Trawick <tr...@gmail.com>.
On Wed, Jul 14, 2010 at 9:53 PM, Alessandro Vernet <av...@scdi.org> wrote:
> Jeff,
>
> Thank you for the precisions, and for the updated documentation. Let
> me make sure I understand this correctly.
>
> The use case:
>
> Simply put, when using Apache as a load balancer, I'd like to limit
> the number of connections Apache makes to back-end servers. When
> processing requests requires a fair amount memory on back-end servers,
> there often isn't much benefit in going over 2 concurrent requests per
> core per back-end servers, and or performance might even degrade when
> going well over this. So I'd like to tell Apache: "don't send more
> than, say, 4 concurrent requests per back-end server; if you have more
> (e.g. because all back-end servers are busy, or you need to send the
> request to a specific one because of the sticky session, and that guy
> is already handling 4 concurrent requests), just queue it".
>
> How to do it:
>
> 1. The config looks like (assuming AJP is used to Tomcat):
>
> ProxyPass / balancer://mycluster/ stickysession=JSESSIONID|jsessionid
> <Proxy balancer://mycluster>
>    BalancerMember ajp://192.168.0.100:8009 max=4
>    BalancerMember ajp://192.168.0.101:8009 max=4
>    BalancerMember ajp://192.168.0.102:8009 max=4
>    BalancerMember ajp://192.168.0.103:8009 max=4
> </Proxy>
>
> 2. Prefork MPM can't be used for this.

correct, any time you want to allow fewer backend connections than
client connections

> 3. On Windows, we're all good as winnt MPM creates only one process.
> 4. On UNIX, we need to use worker MPM, and need to make sure there is
> only one process. This means we need to set ServerLimit to 1 (?).
> [This point is a rather drastic requirements, as many organizations
> won't want to recompile or use a different Apache than the one they
> already have, which is likely to be the prefork on UNIX.]
>
> Does this sound about right?

worker or event
ThreadsPerChild == MaxClients (and may as well set ServerLimit to 1)

One child process is the simplest/most obvious case.  I think it will
still work close enough to the desired goal if you have 2-3 child
processes which share the workload and connection quota.



>
> Alex
>
> On Wed, Jul 14, 2010 at 4:17 AM, Jeff Trawick <tr...@gmail.com> wrote:
>> On Tue, Jul 13, 2010 at 8:42 PM, Alessandro Vernet <av...@scdi.org> wrote:
>>> Igor,
>>>
>>> I am running Apache 2.2.14. Re-reading the documentation for "max", I see:
>>>
>>> The default for a Hard Maximum for the number of connections is the
>>> number of threads per process in the active MPM. In the Prefork MPM,
>>> this is always 1, while with the Worker MPM it is controlled by the
>>> ThreadsPerChild.
>>>
>>> So the default of max in prefork MPM is 1, which doesn't make any
>>> sense unless you understand this as "1 per Apache process". So maybe
>>> with prefork, the value of max is per process. Since my understanding
>>> is that in prefork there each concurrent request is handled by a
>>> different process, that max parameter would be useless in prefork MPM.
>>> (Hopefully my understanding is not correct!)
>>>
>>> Alex
>>>
>>> On Fri, Jul 9, 2010 at 5:10 PM, Igor Cicimov <ic...@gmail.com> wrote:
>>>> Hmmmm I had to read the documentation again my self and I can't find any
>>>> mention of what type of MPM is supported in this case. All it says is
>>>> "Apache will never create more than the Hard Maximum connections to the
>>>> backend server" so it makes me expect that max parameter should be in force
>>>> no matter what MPM is in use. But having in mind Eric's comment looks like
>>>> this is not communicated across different processes and since every thread
>>>> is a new process in MPM prefork the max setting will fail.
>>
>> I'm not sure how successful I was, but I recently tried to clarify
>> this multi-process issue in the trunk documentation
>> (http://httpd.apache.org/docs/trunk/mod/mod_proxy.html#proxypass).  It
>> seems to be a common confusion, regardless of the level of experience
>> of the user.
>>
>> In fact proxy *could* share the pool limits across MPM child
>> processes.  However, it wouldn't be practical to share the connection
>> pool itself, and I think it would be harmful to share the limits
>> without sharing the pool.  So this proxy connection pool is probably a
>> permanent consideration for the choice between one child process with
>> lots of threads vs. multiple child processes with smaller numbers of
>> threads.  2-3 child processes with a somewhat large number of threads
>> is probably close enough to the simplest/one-child-process solution to
>> be able to reasonably configure the pool to match the backend
>> capacity.  But as there is usually no fairness in the utilization of
>> httpd front-end processes, except when the capacity closely matches
>> the client load, increasing the number of httpd child processes, and
>> thus the number of connection pools, results in underutilized pools,
>> or underutilized slices of the overall capacity.
>>
>> ---------------------------------------------------------------------
>> 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
>>
>>
>
>
>
> --
> Orbeon Forms - Web forms, open-source, for the Enterprise -
> http://www.orbeon.com/
> My Twitter: http://twitter.com/avernet
>
> ---------------------------------------------------------------------
> 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
>
>



-- 
Born in Roswell... married an alien...

---------------------------------------------------------------------
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] mod_proxy: ProxyPass max parameter has no effect

Posted by Alessandro Vernet <av...@scdi.org>.
Jeff,

Thank you for the precisions, and for the updated documentation. Let
me make sure I understand this correctly.

The use case:

Simply put, when using Apache as a load balancer, I'd like to limit
the number of connections Apache makes to back-end servers. When
processing requests requires a fair amount memory on back-end servers,
there often isn't much benefit in going over 2 concurrent requests per
core per back-end servers, and or performance might even degrade when
going well over this. So I'd like to tell Apache: "don't send more
than, say, 4 concurrent requests per back-end server; if you have more
(e.g. because all back-end servers are busy, or you need to send the
request to a specific one because of the sticky session, and that guy
is already handling 4 concurrent requests), just queue it".

How to do it:

1. The config looks like (assuming AJP is used to Tomcat):

ProxyPass / balancer://mycluster/ stickysession=JSESSIONID|jsessionid
<Proxy balancer://mycluster>
    BalancerMember ajp://192.168.0.100:8009 max=4
    BalancerMember ajp://192.168.0.101:8009 max=4
    BalancerMember ajp://192.168.0.102:8009 max=4
    BalancerMember ajp://192.168.0.103:8009 max=4
</Proxy>

2. Prefork MPM can't be used for this.
3. On Windows, we're all good as winnt MPM creates only one process.
4. On UNIX, we need to use worker MPM, and need to make sure there is
only one process. This means we need to set ServerLimit to 1 (?).
[This point is a rather drastic requirements, as many organizations
won't want to recompile or use a different Apache than the one they
already have, which is likely to be the prefork on UNIX.]

Does this sound about right?

Alex

On Wed, Jul 14, 2010 at 4:17 AM, Jeff Trawick <tr...@gmail.com> wrote:
> On Tue, Jul 13, 2010 at 8:42 PM, Alessandro Vernet <av...@scdi.org> wrote:
>> Igor,
>>
>> I am running Apache 2.2.14. Re-reading the documentation for "max", I see:
>>
>> The default for a Hard Maximum for the number of connections is the
>> number of threads per process in the active MPM. In the Prefork MPM,
>> this is always 1, while with the Worker MPM it is controlled by the
>> ThreadsPerChild.
>>
>> So the default of max in prefork MPM is 1, which doesn't make any
>> sense unless you understand this as "1 per Apache process". So maybe
>> with prefork, the value of max is per process. Since my understanding
>> is that in prefork there each concurrent request is handled by a
>> different process, that max parameter would be useless in prefork MPM.
>> (Hopefully my understanding is not correct!)
>>
>> Alex
>>
>> On Fri, Jul 9, 2010 at 5:10 PM, Igor Cicimov <ic...@gmail.com> wrote:
>>> Hmmmm I had to read the documentation again my self and I can't find any
>>> mention of what type of MPM is supported in this case. All it says is
>>> "Apache will never create more than the Hard Maximum connections to the
>>> backend server" so it makes me expect that max parameter should be in force
>>> no matter what MPM is in use. But having in mind Eric's comment looks like
>>> this is not communicated across different processes and since every thread
>>> is a new process in MPM prefork the max setting will fail.
>
> I'm not sure how successful I was, but I recently tried to clarify
> this multi-process issue in the trunk documentation
> (http://httpd.apache.org/docs/trunk/mod/mod_proxy.html#proxypass).  It
> seems to be a common confusion, regardless of the level of experience
> of the user.
>
> In fact proxy *could* share the pool limits across MPM child
> processes.  However, it wouldn't be practical to share the connection
> pool itself, and I think it would be harmful to share the limits
> without sharing the pool.  So this proxy connection pool is probably a
> permanent consideration for the choice between one child process with
> lots of threads vs. multiple child processes with smaller numbers of
> threads.  2-3 child processes with a somewhat large number of threads
> is probably close enough to the simplest/one-child-process solution to
> be able to reasonably configure the pool to match the backend
> capacity.  But as there is usually no fairness in the utilization of
> httpd front-end processes, except when the capacity closely matches
> the client load, increasing the number of httpd child processes, and
> thus the number of connection pools, results in underutilized pools,
> or underutilized slices of the overall capacity.
>
> ---------------------------------------------------------------------
> 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
>
>



-- 
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet

---------------------------------------------------------------------
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] mod_proxy: ProxyPass max parameter has no effect

Posted by Jeff Trawick <tr...@gmail.com>.
On Tue, Jul 13, 2010 at 8:42 PM, Alessandro Vernet <av...@scdi.org> wrote:
> Igor,
>
> I am running Apache 2.2.14. Re-reading the documentation for "max", I see:
>
> The default for a Hard Maximum for the number of connections is the
> number of threads per process in the active MPM. In the Prefork MPM,
> this is always 1, while with the Worker MPM it is controlled by the
> ThreadsPerChild.
>
> So the default of max in prefork MPM is 1, which doesn't make any
> sense unless you understand this as "1 per Apache process". So maybe
> with prefork, the value of max is per process. Since my understanding
> is that in prefork there each concurrent request is handled by a
> different process, that max parameter would be useless in prefork MPM.
> (Hopefully my understanding is not correct!)
>
> Alex
>
> On Fri, Jul 9, 2010 at 5:10 PM, Igor Cicimov <ic...@gmail.com> wrote:
>> Hmmmm I had to read the documentation again my self and I can't find any
>> mention of what type of MPM is supported in this case. All it says is
>> "Apache will never create more than the Hard Maximum connections to the
>> backend server" so it makes me expect that max parameter should be in force
>> no matter what MPM is in use. But having in mind Eric's comment looks like
>> this is not communicated across different processes and since every thread
>> is a new process in MPM prefork the max setting will fail.

I'm not sure how successful I was, but I recently tried to clarify
this multi-process issue in the trunk documentation
(http://httpd.apache.org/docs/trunk/mod/mod_proxy.html#proxypass).  It
seems to be a common confusion, regardless of the level of experience
of the user.

In fact proxy *could* share the pool limits across MPM child
processes.  However, it wouldn't be practical to share the connection
pool itself, and I think it would be harmful to share the limits
without sharing the pool.  So this proxy connection pool is probably a
permanent consideration for the choice between one child process with
lots of threads vs. multiple child processes with smaller numbers of
threads.  2-3 child processes with a somewhat large number of threads
is probably close enough to the simplest/one-child-process solution to
be able to reasonably configure the pool to match the backend
capacity.  But as there is usually no fairness in the utilization of
httpd front-end processes, except when the capacity closely matches
the client load, increasing the number of httpd child processes, and
thus the number of connection pools, results in underutilized pools,
or underutilized slices of the overall capacity.

---------------------------------------------------------------------
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] mod_proxy: ProxyPass max parameter has no effect

Posted by Alessandro Vernet <av...@scdi.org>.
Igor,

I am running Apache 2.2.14. Re-reading the documentation for "max", I see:

The default for a Hard Maximum for the number of connections is the
number of threads per process in the active MPM. In the Prefork MPM,
this is always 1, while with the Worker MPM it is controlled by the
ThreadsPerChild.

So the default of max in prefork MPM is 1, which doesn't make any
sense unless you understand this as "1 per Apache process". So maybe
with prefork, the value of max is per process. Since my understanding
is that in prefork there each concurrent request is handled by a
different process, that max parameter would be useless in prefork MPM.
(Hopefully my understanding is not correct!)

Alex

On Fri, Jul 9, 2010 at 5:10 PM, Igor Cicimov <ic...@gmail.com> wrote:
> Hmmmm I had to read the documentation again my self and I can't find any
> mention of what type of MPM is supported in this case. All it says is
> "Apache will never create more than the Hard Maximum connections to the
> backend server" so it makes me expect that max parameter should be in force
> no matter what MPM is in use. But having in mind Eric's comment looks like
> this is not communicated across different processes and since every thread
> is a new process in MPM prefork the max setting will fail.
>
> What version of apache do you use? If it is apache2 would it be too much
> trouble for you to recompile with MPM worker instead prefork?
> Cheers,
> Igor
>
> On Sat, Jul 10, 2010 at 9:49 AM, Alessandro Vernet <av...@scdi.org> wrote:
>>
>> Igor,
>>
>> On Tue, Jul 6, 2010 at 4:40 PM, Igor Cicimov <ic...@gmail.com> wrote:
>> > Shouldnt it be smax instead max?
>>
>> From the documentation, I gather that the default value of smax is
>> max, so just setting max should be safe. Just in case, I tried setting
>> smax, and it doesn't make a difference. Both max and smax seem to have
>> no effect with prefork MPM.
>>
>> Does this mean that max/smax can't be used with prefork MPM? If that
>> is the case, is there any other way to do this in prefork MPM?
>>
>> Alex
>> --
>> Orbeon Forms - Web forms, open-source, for the Enterprise -
>> http://www.orbeon.com/
>> My Twitter: http://twitter.com/avernet
>>
>> ---------------------------------------------------------------------
>> 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
>>
>
>



-- 
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet

---------------------------------------------------------------------
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] mod_proxy: ProxyPass max parameter has no effect

Posted by Igor Cicimov <ic...@gmail.com>.
Hmmmm I had to read the documentation again my self and I can't find any
mention of what type of MPM is supported in this case. All it says is
"Apache will never create more than the Hard Maximum connections to the
backend server" so it makes me expect that max parameter should be in force
no matter what MPM is in use. But having in mind Eric's comment looks like
this is not communicated across different processes and since every thread
is a new process in MPM prefork the max setting will fail.

What version of apache do you use? If it is apache2 would it be too much
trouble for you to recompile with MPM worker instead prefork?

Cheers,
Igor


On Sat, Jul 10, 2010 at 9:49 AM, Alessandro Vernet <av...@scdi.org> wrote:

> Igor,
>
> On Tue, Jul 6, 2010 at 4:40 PM, Igor Cicimov <ic...@gmail.com> wrote:
> > Shouldnt it be smax instead max?
>
> From the documentation, I gather that the default value of smax is
> max, so just setting max should be safe. Just in case, I tried setting
> smax, and it doesn't make a difference. Both max and smax seem to have
> no effect with prefork MPM.
>
> Does this mean that max/smax can't be used with prefork MPM? If that
> is the case, is there any other way to do this in prefork MPM?
>
> Alex
> --
> Orbeon Forms - Web forms, open-source, for the Enterprise -
> http://www.orbeon.com/
> My Twitter: http://twitter.com/avernet
>
> ---------------------------------------------------------------------
> 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] mod_proxy: ProxyPass max parameter has no effect

Posted by Alessandro Vernet <av...@scdi.org>.
Igor,

On Tue, Jul 6, 2010 at 4:40 PM, Igor Cicimov <ic...@gmail.com> wrote:
> Shouldnt it be smax instead max?

>From the documentation, I gather that the default value of smax is
max, so just setting max should be safe. Just in case, I tried setting
smax, and it doesn't make a difference. Both max and smax seem to have
no effect with prefork MPM.

Does this mean that max/smax can't be used with prefork MPM? If that
is the case, is there any other way to do this in prefork MPM?

Alex
-- 
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet

---------------------------------------------------------------------
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] mod_proxy: ProxyPass max parameter has no effect

Posted by Igor Cicimov <ic...@gmail.com>.
Shouldnt it be smax instead max?

Sent from my phone

On Jul 7, 2010 6:54 AM, "Alessandro Vernet" <av...@scdi.org> wrote:

Eric,

On Tue, Jul 6, 2010 at 12:15 PM, Eric Covener <co...@gmail.com> wrote: >
What MPM? This isn't co...
I am using prefork MPM. Are you saying that since each request is
handled by one process, the max parameter doesn't work with prefork
MPM? Then how should I go about doing this (i.e. setting a max number
of connection per server, which in the "real" configuration are setup
with BalancerMember in a cluster)?

Alex -- Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/ My Twit...

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apa...

Re: [users@httpd] mod_proxy: ProxyPass max parameter has no effect

Posted by Alessandro Vernet <av...@scdi.org>.
Eric,

On Tue, Jul 6, 2010 at 12:15 PM, Eric Covener <co...@gmail.com> wrote:
> What MPM?  This isn't coordinated cross-process.

I am using prefork MPM. Are you saying that since each request is
handled by one process, the max parameter doesn't work with prefork
MPM? Then how should I go about doing this (i.e. setting a max number
of connection per server, which in the "real" configuration are setup
with BalancerMember in a cluster)?

Alex
-- 
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet

---------------------------------------------------------------------
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] mod_proxy: ProxyPass max parameter has no effect

Posted by Eric Covener <co...@gmail.com>.
On Tue, Jul 6, 2010 at 3:10 PM, Alessandro Vernet <av...@scdi.org> wrote:
> I am using the following Apache config to forward requests to a Tomcat server:
>
>    ProxyPass /myapp ajp://localhost:8009/myapp max=2
>
> This is a simplified config, but is enough to reproduce the issue,
> which is that the max parameter has no effect. If I through 10
> concurrent requests to Apache, all 10 are forwarded to Tomcat at the
> same time, while I would like to have them forwarded 2 by 2. Should I
> use something other than the max parameter for this?

What MPM?  This isn't coordinated cross-process.

-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
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