Issues

ZF-12168: Unable to free memory (unset) Zend_XMLRPC_Client

Issue Type: Bug Created: 2012-04-23T12:53:28.000+0000 Last Updated: 2012-04-23T12:53:28.000+0000 Status: Open Fix version(s): Reporter: mario (mariof155) Assignee: Lars Strojny (lars) Tags: - Zend_XmlRpc_Client

  • memory

Related issues: Attachments:

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:

<pre class="highlight">
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

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts