Re: Possible infinite loop in mod_proxy

Graham Leggett <[email protected]> Tue, 18 Feb 2003 07:40:35 +0200
Newsgroups gmane.comp.apache.mod-proxy
Message-ID <[email protected]>
Chris Monson wrote:

> So, here is my take on this.  I got mod_proxy to at least stop hanging 
> and constantly hitting the origin server by adding the following two 
> lines of code to mod_proxy.c:
> 
> origin->keep_alive = 0;
> apr_table_set( r->headers_in, "Connection", "Close );

What you have effectively done is turn keepalives off.

> This is, of course, not the right thing to do, but I wanted to see if it 
> would fix the problem, and it did.  I can now correctly proxy, even if 
> it is slow because of the lack of keep-alive.  I believe what is 
> happening is mod_proxy_http is deciding to keep the connection alive on 
> the backend, which is correct, but it is failing to inform the browser 
> that it has done so.

Keepalive is implied by the HTTP/1.1 protocol, there is no need for 
proxy to inform the browser.

It would help if you attach a debugger to the stuck process and see 
where it is getting stuck in the infinite loop.

Regards,
Graham
-- 
-----------------------------------------
[email protected]		"There's a moon
					over Bourbon Street
						tonight..."