I saw another issue regarding this but the problem is still there for
long running server scenarios. I'm pasting the code below, where the
server is trying to download a report from AdWords in an infinite loop.
The below code is executed multiple times in a larger loop, it traverses all accounts, all campaigns, etc...It works, until it eventually hangs. No exceptions are thrown.
When I break into the code in Visual
Studio, it's waiting for the highlighted line to execute. This call also doesn't time out.
Note that while it's undeterministic when it'll finally hang, but eventually it does. Your help is appreciated.
code below:
int downloadAttempts = 1;
while (true)
{
try
{
ReportUtilities utilities = new ReportUtilities(user, "v201506", definition);
using (Google.Api.Ads.Common.Util.Reports.ReportResponse response = utilities.GetResponse())
{
response.Save(saveFileName);
retval = new FileStream(saveFileName,FileMode.Open);
}
break;
}
catch (Exception ex)
{
string errMessage = ex.Message;
if (ex.InnerException != null)
errMessage = errMessage + ex.InnerException.Message;
Console.WriteLine("Attempt:{0}. Failed to download report.{1}", downloadAttempts, errMessage);
downloadAttempts++;
// return retval;
// throw new System.ApplicationException("Failed to download report.", ex);
}
}