Re: [PHP] PHP and Connection: Close

2006-03-24 Thread Chris Shiflett
Jon Anderson wrote: ... SetEnvIf User-Agent ".*MSIE.*" nokeepalive ... ... I seem to recall this being due to a bug in Internet Explorer that keeps the connection open longer than necessary, tying up server resources. George Schlossnagle has a formula for calculating the win/loss of using

Re: [PHP] PHP and Connection: Close

2006-03-23 Thread Jon Anderson
Richard Lynch wrote: I *think* both client and server have to agree/support keep-alive, and both have to be ready for the other guy to close the connection even though they agreed in advance to keep-alive. So you can use keep-alive, and it can work nifty, but ya gotta be ready for the server/cli

Re: [PHP] PHP and Connection: Close

2006-03-23 Thread Richard Lynch
I *think* both client and server have to agree/support keep-alive, and both have to be ready for the other guy to close the connection even though they agreed in advance to keep-alive. So you can use keep-alive, and it can work nifty, but ya gotta be ready for the server/client to claim to support

Re: [PHP] PHP and Connection: Close

2006-03-23 Thread Richard Lynch
httpd.conf search for Keep-alive Some old old old browsers will puke on it, though, I think... We're talking like Netscape 2.0 though, as I recall... I got swiss-cheese memory, so better double-check that. :-) On Tue, March 21, 2006 5:16 pm, Jon Anderson wrote: > I've been looking at a proble

Re: [PHP] PHP and Connection: Close

2006-03-21 Thread Jon Anderson
Chris Shiflett wrote: In that case, I think a good next step would be to examine the HTTP request. One guess is that the request you type in manually with telnet is HTTP/1.1, and the one being sent in your SOAP request is HTTP/1.0. You are actually quite correct... The requests are being sent f

Re: [PHP] PHP and Connection: Close

2006-03-21 Thread Chris
Chris Shiflett wrote: Chris wrote: If you're doing an exit() or die() or the script stops executing that's like you closing the connection - so apache is going to close the connection (as it should). The connection Jon is talking about is the TCP connection, just in case that's not clear. I

Re: [PHP] PHP and Connection: Close

2006-03-21 Thread Chris Shiflett
Chris wrote: If you're doing an exit() or die() or the script stops executing that's like you closing the connection - so apache is going to close the connection (as it should). The connection Jon is talking about is the TCP connection, just in case that's not clear. I'm not sure what connecti

Re: [PHP] PHP and Connection: Close

2006-03-21 Thread Chris Shiflett
Jon Anderson wrote: Keep alives are definitely configured in the server - I can request scripts multiple times manually from a telnet client. In that case, I think a good next step would be to examine the HTTP request. One guess is that the request you type in manually with telnet is HTTP/1.1

Re: [PHP] PHP and Connection: Close

2006-03-21 Thread Jon Anderson
Chris Shiflett wrote: Check the KeepAlive configuration directive in httpd.conf. Keep alives are definitely configured in the server - I can request scripts multiple times manually from a telnet client. It seems to be just SOAP requests in PHP that get mucked up - even if I send a "Connection:

Re: [PHP] PHP and Connection: Close

2006-03-21 Thread Chris
Jon Anderson wrote: Chris wrote: That's the design of http - it's stateless. Each connection is treated separately and as such closes itself when it's finished. If you want to keep it open you'll need to create your own "service" that listens to a port and responds accordingly - which can be

Re: [PHP] PHP and Connection: Close

2006-03-21 Thread Jon Anderson
Chris wrote: That's the design of http - it's stateless. Each connection is treated separately and as such closes itself when it's finished. If you want to keep it open you'll need to create your own "service" that listens to a port and responds accordingly - which can be quite a lot of work.

Re: [PHP] PHP and Connection: Close

2006-03-21 Thread Chris Shiflett
Jon Anderson wrote: It seems to work okay, except that at the TCP level, the client keeps initiating new connections for every soap request rather than using a single connection for multiple requests. One possible reason for this is that the server sends a "Connection: close" HTTP header after th

Re: [PHP] PHP and Connection: Close

2006-03-21 Thread Chris
Jon Anderson wrote: I've been looking at a problem with our software. It uses Flash with SOAP to connect to a PHP backend. It seems to work okay, except that at the TCP level, the client keeps initiating new connections for every soap request rather than using a single connection for multiple

[PHP] PHP and Connection: Close

2006-03-21 Thread Jon Anderson
I've been looking at a problem with our software. It uses Flash with SOAP to connect to a PHP backend. It seems to work okay, except that at the TCP level, the client keeps initiating new connections for every soap request rather than using a single connection for multiple requests. One possibl