Re: Concurrency issues with ReportUtilities.DownloadClientReport

2013-07-23 Thread Anash P. Oommen (AdWords API Team)
Hi,

The library doesn't do anything to do requests in sequence, the only place 
where it can get blocked is in the number of HTTP connections. I'd also try 
one additional thing, to prepopulate the authToken as follows:

user.Config.AuthToken = new AuthToken(config, 
AdWordsSoapClient.SERVICE_NAME).GetToken();


// Start the threads.


You could also setup Fiddler on your developer computer to see if the library 
is indeed sending out 64 requests as expected or not.


Cheers,

Anash


On Thursday, July 18, 2013 2:12:28 AM UTC+5:30, sbu...@acquisio.com wrote:

 Hi,

 We need help with using the awapi_dotnet_lib_v15.8.0 library (which was 
 the latest version four weeks ago).

 We currently have a windows service that creates 64 threads. Each thread 
 then fetches reports (CAMPAIGN_PERFORMANCE_REPORT for a single campaign) in 
 a loop. We are having trouble when concurrently fetching those reports when 
 using the DownloadClientReportT(T reportDefinition, string path) method. 
 What we see is that the first thread that completes is able to download the 
 report in 3-4 seconds. However, the following downloads get linearly slower 
 until they stabilize around an average of 2 min 30 sec per download.

 This would seem to indicate that even when running in parallel, the 
 library is actually executing our report calls sequentially.

 This unfortunately happens in our PRODUCTION environment and on our 
 developers' environment, but surprisingly not on our QA environment. This 
 would seem to indicate that it is a server setting, but we cannot find 
 which one it is.

 We have already set the following in the App.config of the service (with 
 no luck):

   system.net
 connectionManagement
   clear /
   add address=* maxconnection=1000 /
 /connectionManagement
 settings
   httpWebRequest maximumErrorResponseLength=-1 /
 /settings
   /system.net

 We have also tried setting ServicePointManager.DefaultConnectionLimit = 
 1000 at the start of the service, but again with no success.  
   
 The strange thing is that we do not see this problem with the previous 
 .Net library that we have been using (adxbuyer_dotnet_lib_src_v15.0.0) !

 Did something change in the source code that would explain this behavior ? 
 Do you have any other idea of how to resolve this issue ?

 Thanks for your help.


-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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.




Re: Concurrency issues with ReportUtilities.DownloadClientReport

2013-07-23 Thread sbuteau
After a lot of trial and error, we finally found out a solution. It was 
simply the case of changing the user under which the windows service was 
running ! 

We changed the windows service identity from LOCAL SYSTEM to an Active 
Directory administrator, and it magically fixed our concurrency problem. 
Now even if it is gone, we still have no idea WHY that change fixed it. 
Normally, LOCAL SYSTEM is a higher privilege account that should have 
enough rights to do most operations on a server. What is even more 
surprising is that depending on the Administrator account that we were 
using, the outcome was different. Some of our AD administrator accounts 
showed the concurrency issue, others fixed it !?

We even wrote a small console application that simply created new tasks 
with Task.Factory.StartNew(Action, TaskCreationOptions.LongRunning) to 
download reports in parallel, and depending on who was running it on a 
server, we could systematically reproduce the concurrency problem.

My interpretation is that we may have found a deeper issue in .Net. We are 
not sure what change in awapi_dotnet_lib_v15.0.0 to 
awapi_dotnet_lib_v15.8.0 started triggering this issue.

I hope this may help others that encounter this same problem.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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.




Concurrency issues with ReportUtilities.DownloadClientReport

2013-07-18 Thread sbuteau
Hi,

We need help with using the awapi_dotnet_lib_v15.8.0 library (which was the 
latest version four weeks ago).

We currently have a windows service that creates 64 threads. Each thread 
then fetches reports (CAMPAIGN_PERFORMANCE_REPORT for a single campaign) in 
a loop. We are having trouble when concurrently fetching those reports when 
using the DownloadClientReportT(T reportDefinition, string path) method. 
What we see is that the first thread that completes is able to download the 
report in 3-4 seconds. However, the following downloads get linearly slower 
until they stabilize around an average of 2 min 30 sec per download.

This would seem to indicate that even when running in parallel, the library 
is actually executing our report calls sequentially.

This unfortunately happens in our PRODUCTION environment and on our 
developers' environment, but surprisingly not on our QA environment. This 
would seem to indicate that it is a server setting, but we cannot find 
which one it is.

We have already set the following in the App.config of the service (with no 
luck):

  system.net
connectionManagement
  clear /
  add address=* maxconnection=1000 /
/connectionManagement
settings
  httpWebRequest maximumErrorResponseLength=-1 /
/settings
  /system.net

We have also tried setting ServicePointManager.DefaultConnectionLimit = 
1000 at the start of the service, but again with no success.  
  
The strange thing is that we do not see this problem with the previous .Net 
library that we have been using (adxbuyer_dotnet_lib_src_v15.0.0) !

Did something change in the source code that would explain this behavior ? 
Do you have any other idea of how to resolve this issue ?

Thanks for your help.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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.