Timed out connect in add complete campaign workflow

55 views
Skip to first unread message

Carmine Pagliaro

unread,
Sep 4, 2017, 11:58:12 AM9/4/17
to AdWords API Forum
Hi all,
I'm trying to add a complete campaign via Api.
I have 1 Campaign with around 50 adGroups and each adGroup with 3 ads. Each ads has 1 label.
I'm able to add around 26 adgroups in few seconds (max 2 minutes), but then I get a timed out connection error.

I increased the soapRequestTimeout up to 60minutes, but nothing changed.

My workflow is:
  1. create campaign obj
  2. Add campaign (call mutate function)
  3. get id campaign added
  4. create adgroup obj
  5. set campaign id
  6. add adgroup (call mutate function)
  7. create extended ads list
  8. set adgroup is
  9. add extendedads (call mutate function)
  10. get extendedads list
  11. for each ads create label and add label


I have huge quantities of data in a flat file.

Could you suggest me an optimized workflow?

Could the implementation of the AddCompleteCampaignUsingBatchJob example solve my problem?


Thanks

Vincent Racaza (AdWords API Team)

unread,
Sep 5, 2017, 1:30:25 AM9/5/17
to AdWords API Forum
Hi Carmine,

It seems that this issue is the one that you have told us privately on this forum post. As I have told previously, you can also try to increase your socketTimeOut to more than 60 minutes. And yes, you are correct. Aside from increasing the socketTimeOut, you can also implement batch processing for your requests. As for the batch processing, it performs batches of operations on multiple services without waiting for these operations to complete. Kindly refer to this guide to know more about batch processing using BatchJobService.

Kindly take note that based on the guide, there are only specific operations and services that you can use in batch processing. You can implement this on your end and check if the timeout issue will not occur anymore.

Thanks,
Vincent
AdWords API Team

Carmine Pagliaro

unread,
Sep 7, 2017, 3:22:22 AM9/7/17
to AdWords API Forum
Thks Vincent, Implementing Batch solve my problem to load huge quantities of data.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages