Problem in downloading Ad performance Report of file size above 500MB

63 views
Skip to first unread message

shibu thomas

unread,
May 8, 2014, 11:51:40 AM5/8/14
to adwor...@googlegroups.com

Hi -

I've successfully been able to create report definitions (Ad Performance Report and Keyword Performance Report) and when I log into the MCC account I'm able to run the reports and it returns with appropriate data.  However, when I attempt to download the report via the reportdownload API (v201402), I got an error message and the download process is stopped .The downloaded Report has file size  above 524MB .No problem for downloading smaller reports.

I've followed the errors-

Warning: simplexml_load_file(): Memory allocation failed : building node in file name
Warning: simplexml_load_file(): reports/reportname.xml:1: error: xmlSAX2StartElementNs: out of memory
Warning: simplexml_load_file(): reports/reportname.xml:1: parser error : Extra content at the end of the document in





Any help would be appreciated.
Shibu Thomas

Ray Tsang (AdWords API Team)

unread,
May 9, 2014, 4:18:13 PM5/9/14
to adwor...@googlegroups.com
Shibu,

Did you call simplexml_load_file directly or was that called from the client library?  To process a large amount of XML files, you may want to take a streaming approach instead in order to avoid memory issues.  We also recommend users to get data in smaller chunks with smaller date range and narrower predicates.

Thanks,

Ray

Anash P. Oommen (AdWords API Team)

unread,
May 12, 2014, 1:44:43 PM5/12/14
to adwor...@googlegroups.com
Hi Shibu,

524MB is a big xml, you might want to increase the memory on your machine, or consider an alternate format like CSV for downloading the reports.

Cheers,
Anash P. Oommen,
AdWords API Advisor.

Rooney Achilles

unread,
May 13, 2014, 5:45:32 AM5/13/14
to adwordsapia...@google.com, adwor...@googlegroups.com
Hi Shibu,

We too faced the same memory load issue when parsing an big XML file, but we have overcome this problem by using SAX Parser API.
The other APIs like SAX Builder will load the whole 500MB file into memory and try to parse which leads to memory load. But this SAXParser doesn't load the file into ram but visits file multiple times for each record.

Try this solution.


--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
 
You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups "AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages