PEAR SOAP 0.9.1/PHP - memory exhausted

From: Date: Fri, 23 Dec 2005 02:04:20 +0000
Subject: PEAR SOAP 0.9.1/PHP - memory exhausted
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-22336@lists.php.net to get a copy of this message
I'm having difficulties returning data from JIRA (a bug management system written in Java) SOAP services. First problem is calling methods: calling getProxyGenerationCode returns to be what looks like a correct "stub" of the JiraSoapService class and the methods that return strings work fine, for example, the login method takes two strings (un/pw) as args and returns a string token. Works fine. Same with the getServerInfo method -- it returns an array of strings for the server information. No problem. Complex types, like the RemoteUser, give me "undefined function" errors when calling its methods like getUserName and getEmail. After mindnumbing trial and error, I tried accessing the Object properties like email, and userName, and fullName and they return the correct strings. Weird but doable. Getting over these oddities brings me to problem #2: memory leaks: I've attempted to return an array of RemoteIssue objects using the getIssuesByFilter (string token, string filterId) and print_r for each object (to see whats going on): ini_set('memory_limit', '150M'); $wsdl = 'http://jira.atlassian.com/rpc/soap/jirasoapservice-v2?wsdl; $wsdlService = new SOAP_WSDL($wsdl); $client = $wsdlService->getProxy(); $token = $client->login('username','password'); $issues = $client->getIssuesFromFilter($token, '12345'); foreach($issues as $issue) { print_r($issue); } Total no. of objects returned: 199. size of print_r output, on disk, is 307,200 bytes. Note the memory_limit; this is not a constant at all -- I've had a more complex loop with conditionals and string parsing working with a 30 M limit but now, to perform a simpler query, I've had to up it 150M. Something is not right. Interesting, on my Windows machine at work, I've returned 600+ objects, and beefed up the output with a lot of HTML, with it's memory_limit set to the default of 8M. The apache process alone at work was peaking at 97mb of memory usage, which is obviously exceeding the 8M limit, so perhaps Windows Apache/PHP botched the memory_limit? At home: Debian Sarge Apache 1.3 PHP 4.3.7 AMD 900/512 MB RAM Work: Windows XP Apache 2.0 PHP 4.4.0 P4 1.5 1 GB of RAM Can anybody explain a) why the methods for the complex type (RemoteIssue) object are coming back as "undefined function"? b) more importantly, this potential memory leak? Anybody have experience parsing reasonably large SOAP returns? Thanks in advance!

« previous php.pear.general (#22336) next »