Skip to content

Commit

Permalink
Disabling keep-alive for SOAP calls.
Browse files Browse the repository at this point in the history
PHP SoapClient creates keep-alive connections but never reuse them.
Disabling this behavior. Should resolve issues #298 and #287.
  • Loading branch information
dklimkin committed May 30, 2017
1 parent d6a137e commit 17bf38c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Google/AdsApi/Common/AdsSoapClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ public function __construct($wsdl, array $options = null) {
if (array_key_exists('classmap', $options)) {
$this->classmap = $options['classmap'];
}
// SoapClient sets keep alive header by default but does not re-use the
// connections. Disabling this to avoid running out of FD handles.
$options['keep_alive'] = false;

$this->reflection = new Reflection();
parent::__construct($wsdl, $options);
}
Expand Down

0 comments on commit 17bf38c

Please sign in to comment.