ZF-12168: Unable to free memory (unset) Zend_XMLRPC_Client
Description
Hi, good evening.
I was requesting an external API who retrieves 1000 rows (as maximum) per iteration. So, in order to retrieve all my necessary data, I should call several times the same API. As soon as I've read the response (or even if don't do it) the response is stored in memory. I tried to unset the memory the object need doing unset, or setting null. But all my tries were unsuccessful...
I don't know why it's impossible to free that memory space and it's required for the behavior of my script.
Here is my code:
do {
$data = array(
'projectID' => $this->_iProjectID,
'authTimestamp' => microtime(true),
'search' => $this->_aSearch
);
$this->_oXMLRequest = new Zend_XmlRpc_Request();
$this->_oXMLRequest->setEncoding('utf-8');
$this->_oXMLRequest->setMethod('METHOD');
$this->_oXMLRequest->setParams(array($this->_aConnectionData));
$this->_oXMLRPCClient = new Zend_XmlRpc_Client(REQUEST_URL);
$this->_oXMLRPCClient->getHttpClient()->setConfig(array('timeout' => '180'));
$this->_oResponse = new Zend_XmlRpc_Response();
$this->_oXMLRPCClient->doRequest($this->_oXMLRequest, $this->_oResponse);
unset($this->_oXMLRequest);
unset($this->_oXMLRPCClient);
[...]
more code
} while($this->_iNextLoop < $this->_iMaxRows);
Do you have any idea why it's happening?
Comments
No comments to display