#47314 [Opn-Asn]: SoapClient leave tcp connections in time_wait
ID: 47314 Updated by: j...@php.net Reported By: bernd dot ott at k-m dot info -Status: Open +Status: Assigned Bug Type: SOAP related Operating System: Windows PHP Version: 5.2CVS-2009-02-05 (snap) Assigned To: dmitry Previous Comments: [2009-05-05 09:08:48] bernd dot ott at k-m dot info I don't have the ipv6 Stack installed (on any machine). [2009-05-02 02:49:52] j...@php.net But did you do what Pierre asked above ? The hosts thing.. [2009-03-02 08:34:22] bernd dot ott at k-m dot info i created the sample on a old xp machine with apache 2.2 installed. i have tested the webservice with different Clients made with different languages. no other client keep the connections in time_wait. [2009-02-23 11:21:16] paj...@php.net Do you have IPv6 installed (by default on Vista or later, needs an extra package for XP/2k). If yes, edit: C:\windows\system32\drivers\etc\hosts and comment the following line: ::1 localhost becomes: #::1 localhost Restart the web server and test again. [2009-02-23 11:11:00] bernd dot ott at k-m dot info open the socket with fsocketopen / fclose doesnt leave timewait connections. the problem is, this causes my .net soap server to a not response state. this is because all workers are allocated. i cant use keep alive, my page is using ajax to a php page which contains the soapclient. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/47314 -- Edit this bug report at http://bugs.php.net/?id=47314edit=1
#47314 [Opn-Asn]: SoapClient leave tcp connections in time_wait
ID: 47314 Updated by: tony2...@php.net Reported By: bernd dot ott at k-m dot info -Status: Open +Status: Assigned Bug Type: SOAP related Operating System: Windows PHP Version: 5.2CVS-2009-02-05 (snap) -Assigned To: +Assigned To: dmitry Previous Comments: [2009-02-05 13:33:35] bernd dot ott at k-m dot info Description: Call to a Soapserver with the SoapClient leaves after a function call tcp-connection in state time_wait. depending on your server your server get unreachable, because all workers are allocated by the waiting connections. the sample code leaves 100 open connections. if you call more than on function you get more open connections. the soapclient doesnt reuse the open connection. (this is not shown in the sample) the connections you can see in netstat or tcpview (sysinternals) Reproduce code: --- Client: ?php $i=100; while ($i0) { $sc = new SoapClient(null, array('location' = http://localhost/server.php;, 'uri' = http://test-uri/;)); echo $sc-__soapcall(test, array('test')).\r\n; flush(); $i -= 1; } Server: ?php function test($x) { return $x.hallo; } $server = new SoapServer(null, array('uri' = http://test-uri/;)); $server-addFunction(test); $server-handle(); Expected result: Client opens connection, does the function call and terminates connection. after correct close the should no connections in state time_wait. Actual result: -- 100 connections are in time_wait status. -- Edit this bug report at http://bugs.php.net/?id=47314edit=1