php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37827 _very_ long processing time before sending SOAP request with large data
Submitted: 2006-06-16 15:11 UTC Modified: 2006-06-20 07:24 UTC
From: jan at pinna dot nl Assigned:
Status: Closed Package: SOAP related
PHP Version: 5.1.4 OS: Windows Server 2003
Private report: No CVE-ID: None
 [2006-06-16 15:11 UTC] jan at pinna dot nl
Description:
------------
I try to access a webservice over SSL which goes great.
The other party 'abused' the webservice to retrieve data from me, which I 'set' as a parameter.
This is a 'large' amount of data: 4,5MB.
I can't get this done. It seems that there is a large timing problem with it because I get CGI timeouts, NAT firewall timeouts, etc.
I tried, with 110K data the processing time before sending the data is 3minutes. With the whole file, it's _way_ more.
But I think the problem seems that the socket is already opening a port.
Then, after a long period, she wants to send data thru it. 
There it goes wrong (I think because of a linking/timing problem with NAT, if it takes so long before data send/receive over the line which was opened before).
I think this, because when I turn off NAT, it works.
Where I first got incomplete headers, forced broken SSL connections, w/o NAT he really starts, after alot of minutes, sending the data.

I think PHP should send its data quicker.
If you want, I can send you the file I try to send.

Reproduce code:
---------------
<?

$opts = array(
        'ssl' => array(
            'local_cert' => 'keys.pem',
            'passphrase' => 'abcdefg',
            'allow_self_signed' => true
            )
        );
    $ctx = stream_context_create($opts);
    
    $options = array(
        'stream_context'    => $ctx,
		    "trace"      => 1,
		    "exceptions" => 1,
		    "location"=> 'https://xxx.xxx.yyy.zzz/InterbankIncaBTWebService/IncassoRelatieWebservice',
		    'local_cert' => 'keys.pem',
    		'passphrase' => 'abcdefg');
    $client = new SoapClient('wsdl/IncassoRelatieServiceService.wsdl', $options);
        

try
{	
	$filename = "__INPUT/1000188815-8-0-000000012-20060524.xml";
	$handle = fopen ($filename, "r");
	$contents = fread ($handle, filesize ($filename));
	
	print utf8_decode($client->setPortefeuilleoverzichten('1000188815',$contents));
}
catch(SoapFault $exception)
{
		$msg = $exception->__toString();
		print_r($msg);
}
?>

Expected result:
----------------
Some OK text which I normally receive from the WS.

Actual result:
--------------
CGI timeout, after I turn up all the timeouts there are I got broken connections reported, "read timed out" errors from the server side, load of 100% for php in windows, etc.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-06-16 15:16 UTC] bjori@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip
 [2006-06-16 21:26 UTC] jan at pinna dot nl
I'll try it at monday. hope it works...
Is there any reason to believe it should, due to fixes..?
Please let me know otherwise I have to look further. It is not always a solution to get the latest revision ;)
Thanks for now!

J.
 [2006-06-16 22:01 UTC] bjori@php.net
You really think I would have asked you to try if I didn't 
have a reason for it? :)
 [2006-06-17 08:27 UTC] jan at pinna dot nl
ghehe ;)
I'll let you know!
 [2006-06-20 07:23 UTC] jan at pinna dot nl
Hi,
It works!
Thanks for the tip. BTW, can you reveal what was the problem? What is fixed in 5.2.0 what was broke in 5.1.x?
I guessed it has something to do with encoding (because it seems to happen when sending stuff over soap)... but that's just a wild guess. I'm curious.
 [2006-06-20 07:24 UTC] jan at pinna dot nl
I guess we can call it closed now...
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 21 02:01:35 2024 UTC