Allowed memory size of 33554432 bytes exhausted |
Site Admin
|
your script exhausted 32MB, by setting new limit of 16MB you can't solve the problem. You need more than 32MB, or rethink what you're doing and prehaps run smaller requests.
|
||||||||||||
_________________ The PHP IDE team |
|
hi dmitri,
Thanks for the suggestion. Actually i'm quering a database and getting the results. For that i used mysql_fetch_assoc function to get associative array. I have defined the array as below. $server->wsdl->addComplexType( 'Row', 'complexType', 'struct', 'all', '', array( 'id' => array('name' =>'id','type'=>'xsd:int'), 'title' => array('name' =>'title','type'=>'xsd:string'), 'information' => array('name' =>'information','type'=>'xsd:string') ) ); $server->wsdl->addComplexType( 'Entry', 'complexType', 'array', '', 'SOAP-ENC:Array', array(), array(array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:Entry[]')) ); $server->register( 'UdefFn', array('inputString'=>'xsd:string'), array('return'=>'tns:Entry'), $NAMESPACE); function UdefFn($inputString){ { // Connection to database and query to database $BigArr = array(); while($row = mysql_fetch_assoc($result)) { array_push($BigArr, $row); } return $BigArr; } My database sometimes returns more than 10000 rows. I get 3000 entries easily. But more than that i get error. Do i need to define the complexType differently ? How can i achieve gettin all records? Thanks Rohan7 |
||||||||||||
|
|
I would break it into smaller chunks. It'll reduce the load on the server (both PHP & DB if the DB supports getting records in chunks) as well as making getting the results easier.
|
||||||||||||
|
Fix NuSOAP memory size exhausted - change debug level to 0 |
|
SOLUTION for memory leak with NuSOAP.
For production purposes (or if you are processing a lot of data) you just need to change your $GLOBALS['_transient']['static']['nusoap_base']->globalDebugLevel variable from 9 to 0. Depending on your version of NuSOAP, this variable definition may be located in the nusoap.php file at the top. $GLOBALS['_transient']['static']['nusoap_base']->globalDebugLevel = 0; NuSoap appears to keep track of debug information by simple appending to this variable. Good luck! jony5 |
||||||||||||
|
|
I am also having the same problem configuring the memory, thanks for the help.
|
||||||||||||
|
hi |
|
dont know where this function should be pasted. I tried and got error.
One more thing i used mysql_free_results function to free the memory in my code. that is where i dont know too |
||||||||||||
|
Allowed memory size of 33554432 bytes exhausted |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by