Determining the timeout for SearchGoogleAdsStreamRequest API

135 views
Skip to first unread message

Anurag Sinha

unread,
Sep 25, 2022, 10:30:49 AM9/25/22
to Google Ads API and AdWords API Forum
Hi Team,
We wanted to set an optimal timeout while creating SearchGoogleAdsStreamRequest. And for that, we wanted some input from your end.
 
Query Used:  
SELECT user_list.id, user_list.name, user_list.resource_name FROM user_list WHERE user_list.resource_name IN (%s)

Our observation regarding the API is as below:
1. While trying to fetch single audience details by name from the ads network it takes around 0.35 mins when the API is called 3 or 4 times. 
2. In some cases when the API is called multiple times (more than 15 times) then it took more than 15 mins to respond. And in this scenario, not more than 4 audience details were fetched at once from the google ads network.

We wanted to understand which all factors the response time depends on: 
1. Number of audience names that are given in Select Query?

2. Number of audiences present in the network? Ex: fetching 1 audience detail from the network where 10 audiences are totally present in the ad account. Vs 
Fetching 1 audience detail from the network where 10K audiences are totally present in the ad account.  
In both cases, will the response time be the same?

3. Is the number of times API is called, directly proportional to response time? Example: 1 or 2 times when API is called the response time is 0.3 mins and if more than 15 times the same API is called then response time is more than 15 mins. 

Regards,
Anurag Sinha

Google Ads API Forum Advisor

unread,
Sep 26, 2022, 1:04:04 AM9/26/22
to adwor...@googlegroups.com

Hi Anurag,


Thanks for reaching out to the Google Ads API team. I hope you are doing well today.


Upon checking your issue, It appears that your concern is about fetching an audience. Before our team answer your concern and question in general, could you please provide the complete request and response logs, with the request-id? If you haven't yet, logging can be enabled by navigating to the Client libraries > Your client library (ex. Java) > Logging documentation, which you can access from this link. I ask this so our team further investigates your concern and provides specific recommendations on the issue.


You can provide it via Reply privately to the author option. If this option is not available, then send it instead on this email address googleadsa...@google.com.
 

Regards,

Google Logo
Darwin
Google Ads API Team
 

 



ref:_00D1U1174p._5004Q2eg4Dr:ref

Anurag Sinha

unread,
Sep 26, 2022, 3:33:26 AM9/26/22
to Google Ads API and AdWords API Forum
Hi Team, 
Can you please look into the Generic Questions which I have asked under " We wanted to understand which all factors the response time depends on:" and answers those 
and it's not an issue we have faced but are the general questions we had. 
Regards,
Anurag Sinha

Google Ads API Forum Advisor

unread,
Sep 26, 2022, 5:57:15 AM9/26/22
to adwor...@googlegroups.com
Hello Anurag,

Thank you for getting back to our team. I am Carmela from the Google Ads API team.

Moving forward, one of the factors that affect the response time is how big the data that will be downloaded using Google Ads API. As for the other factors, allow me to raise it to the rest of our team. Rest assured that one of our members will reach out to you regarding this matter.

Regards,
Google Logo
Carmela
Google Ads API Team
 


ref:_00D1U1174p._5004Q2eg4Dr:ref

Google Ads API Forum Advisor

unread,
Sep 27, 2022, 9:17:31 AM9/27/22
to adwor...@googlegroups.com
Hello,

When you call the API in quick succession, you may be rate limited. However, in this case, you should get a RESOURCE_TEMPORARILY_EXHAUSTED error; it won't just make a single request linger and then return slower. So I'm curious if you have code in place that may automatically handle these rate limit errors and you're just looking at the total time, or if the API side is actually taking a long time to return. Can you provide the request ID for a single request that takes longer than you would expect to return?

In general, the best practice is to group like queries together as much as possible to avoid the possibility of these rate limits. So if you want to select 4 audiences, and then 4 more, and then 4 more, you might as well select all 12 at once. This will improve your overall throughput, even if that single request does take slightly longer than a request for only 4 would.

Response time can vary based on overall network traffic as well, but that shouldn't affect it so much that it goes from less than 1 minute to over 15 minutes for a similar request.

Let me know if you can get a request ID that is taking longer than you expect so I can take a closer look at that specific one.

Regards,
Mike, Google Ads API Team

ref:_00D1U1174p._5004Q2eg4Dr:ref
Reply all
Reply to author
Forward
0 new messages