Re: httpd choking (503 errors) when stressing mod_proxy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ugh, it reared it's ugly head again.

When i try to use ProxyPassMatch, i get the nasty 503 errors again

Are mod_proxy/mod_rewrite just totally broken on 2.2 for regular expressions under load?

Thanks,
Ahmed

On Thu, Nov 18, 2010 at 9:20 AM, Ahmed Bakir <abakirwork@xxxxxxxxx> wrote:
Thanks, Jeroen.

I used a proxy block with a proxypass option and that fixed my problem. It actually worked perfectly at the base configuration, the proxy pool settings etc helped alleviate the problem but did not remove it completely. The same was observed for KeepAlive Off.

I still suspect that the 2.2 module for mod_rewrite is broken.

Thanks again,
Ahmed


On Wed, Nov 17, 2010 at 1:35 PM, Jeroen Geilman <jeroen@xxxxxxxxx> wrote:
On 11/17/2010 10:23 PM, Ahmed Bakir wrote:
Thanks for the responses!

@jeroen:

- There is no bandwidth difference between the connections. Both the client and the host are either running on the same machine or on the same LAN (I have tested on both and see the problem in both cases)
- I have increased TCP receiver buffers, and that has alleviated the problem but it's not a feasible solution for my application.

Because ?


- I am running httpd on Windows (I have tried both Windows 7 and Windows XP)

Ugh.
Fugly TCP stack.


- These are my MPM details:

Timeout 300
MaxKeepAliveRequests 100
KeepAliveTimeout 15


For a reverse proxy with heavy load, DISABLE keepalives. COMPLETELY.
They don't serve any useful purpose, and may in fact slow things down.

You won't observe the issues when testing from one client, because that one client will re-use its connections.

However, this does not work in the real world - proxy connections are fire-and-forget as far as the server is concerned.

Keepalive under heavy load contributes to what you are seeing - service unavailable.


<IfModule mpm_winnt.c>
ThreadsPerChild 250
MaxRequestsPerChild  0
</IfModule>

- I have configured my reverse proxy using rewrite rules with the [P] directive

This is an example:

RewriteRule ^files/(.*)$ http://localhost:16/$1  [P]

Yeah... that means you can't regulate the proxy pool size and other settings.
I'd reconsider using rewriterules when you don't really know why you're using them.
A proper FilesMatch or Proxy block will do just fine:

<Proxy /files/*>
   ProxyPass http://localhost:16/ min=100 max=250 smax=100 acquire=1000ms
</Proxy>

For example; I am by no means an expert on proxy configuration, but this  I could infer from the documentation in a few minutes.

You need to match the number of backend threads to your expected or - better - observed connections.


- I did not set any ProxyPass options in my config.

Perhaps you should!

--
J.




---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
 "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux