I should also point out that each account runs in a separate thread, with a thread pool size of 6. An AdWordsUser object is created once per account, and re-used for each call to ReportUtils.downloadReport for that account.
On Friday, 14 February 2014 17:43:01 UTC-2, Chris wrote: > > Hi Guys, > > I have a script which goes through lots of AdWords accounts, and pulls > around 30 reports for each. Recently (around 10 days ago) we started having > some problems. Sometimes the process will die, and looking at the errors, > the operating system is reporting 'too many open files'. Running the lsof > utility I see lots of tcp connections in a CLOSE_WAIT state > > e.g. java 17555 root 1332u IPv6 563454454 0t0 TCP > myserver.net:56586->vc-in-f147.1e100.net:https (CLOSE_WAIT) > > I am still using the 'old' java client library for the AdWords API, > version 201306 > > To download the reports I am doing the following: > > ReportDownloadResponse response = ReportUtils.downloadReport(user, > reportDefinition, fos); > > The annoying thing is that sometimes the problem with 'too many files' > occurs, sometimes it doesn't (and only an expected number of ESTABLISHED > connections showing via lsof). Typically the scheduled early morning runs > fail, and then when I do a manual run later in the day it will usually > succeed (though sometimes the same problem still appears). > > There isn't anything in the code that I can/should be doing to close the > connection following the report download is there? > > If there are more details that would be useful in figuring this out, > please let me know. For now I just wanted to present my general problem, > and add any relevant info as dialogue hopefully progresses. > > Any thoughts / information are very gratefully received! I've been > struggling with this issue for a while now, but due to the sporadic nature > of whether the problem does / does not occur, it's proving difficult. > > Thanks > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.