Is 128Mb enough as a PHP allocation?

62 views
Skip to first unread message

Alan Coleman

unread,
Mar 1, 2016, 8:47:04 AM3/1/16
to AdWords API Forum
Hello everyone,

I'm receiving the following error in my logs:

[01-Mar-2016 06:21:03 America/Denver] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 12730211 bytes) in /googleads-php-lib-6.1.0/src/Google/Api/Ads/Common/Util/XmlUtils.php on line 61

Here is the function in question:

  public static function GetXmlFromDom($document) {
   
return trim($document->saveXml()); // Line 61
 
}


My hosting has 128Mb available to allocate to PHP Scripts, no more.

So my question is, is the API Simply running out of memory whilst trying to process data, or is there other issues at play?

Many thanks

Nadine Sundquist (AdWords API Team)

unread,
Mar 1, 2016, 12:13:35 PM3/1/16
to AdWords API Forum
Hi Alan,

Based on the calling structure, it looks like your report definition could be quite large. As far as I can tell, that would be what is getting serialized at the time. Is that the case? If not, could you please click Reply privately to author in the forum and send me your report definition? That way I can try reproducing it from my side to figure out what's going on.

Thanks,
Nadine, AdWords API Team

Alan Coleman

unread,
Mar 3, 2016, 11:07:24 AM3/3/16
to AdWords API Forum
Hi Nadine,

Thanks very much for getting back to me, however this issue was down to my own RAM mismanagement and there not being enough to fulfil some basic requirements.

Thanks again for your response. 

Nadine Sundquist (AdWords API Team)

unread,
Mar 3, 2016, 11:17:15 AM3/3/16
to AdWords API Forum
Hello Alan,

No problem! I'm just glad that you were able to figure out the root of the issue.

Happy coding,
Nadine, AdWords API Team
Reply all
Reply to author
Forward
0 new messages