note 125369 added to soapclient.soapclient
| From: | t dot moser at moetech dot de | Date: | Wed, 16 Sep 2020 13:53:25 +0000 |
| Subject: | note 125369 added to soapclient.soapclient | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-215122@lists.php.net to get a copy of this message | ||
Note that the option "keep_alive" seems to be TRUE by default!
If you are having issues, for example getting the error:
"failed to open stream: Too many open files in"
When executing a multitude of soap requests using a new SoapClient per request will quickly lead to
this error.
What to do:
Add the option 'keep_alive' and set it to false!
<?php
$client = new SoapClient('/path/to/some.wsdl', ['keep_alive' => false,]);
?>
What NOT to do:
Increasing the amount of file streams that are allowed per process. This is just a work-around for
an issue that can easily solved, which will still keep the actual problem alive - the soap client
connections stay alive!
----
Server IP: 45.112.84.4
Probable Submitter: 103.51.167.36 (proxied: 136.144.188.87)
----
Manual Page -- http://php.net/manual/en/soapclient.soapclient.php
Edit -- https://master.php.net/note/edit/125369
Del: integrated -- https://master.php.net/note/delete/125369/integrated
Del: useless -- https://master.php.net/note/delete/125369/useless
Del: bad code -- https://master.php.net/note/delete/125369/bad+code
Del: spam -- https://master.php.net/note/delete/125369/spam
Del: non-english -- https://master.php.net/note/delete/125369/non-english
Del: in docs -- https://master.php.net/note/delete/125369/in+docs
Del: other reasons-- https://master.php.net/note/delete/125369
Reject -- https://master.php.net/note/reject/125369
Search -- https://master.php.net/manage/user-notes.php