A GoogleAds API Call is taking long time time execute when creating a custom audience using MutateUserListsResponse in Java

215 views
Skip to first unread message

Danilo Mozeli

unread,
May 9, 2022, 2:46:47 PM5/9/22
to Google Ads API and AdWords API Forum
Hi,

I'm trying to create an audience based on our company CRM data (email addresses and mobile phones). The system takes forever to execute this command in Java:

Everytime I try to run the method below, it takes ~60 minutes to complete .

// Adds the user list.      MutateUserListsResponse response =          userListServiceClient.mutateUserLists(              Long.toString(customerId), ImmutableList.of(operation));  

Line 198

Note: the attached file contains the entire java class file that I'm using.

API Version: Google Ads API v18 (Java)

Thanks,

Danilo


AddCustomerMatchUserList.java

Google Ads API Forum Advisor

unread,
May 11, 2022, 3:13:05 AM5/11/22
to adwor...@googlegroups.com

Hi Danilo,

Thanks for reaching out to the Google Ads API Forum.

For us to investigate further on the observed behavior, could you provide us with the complete request and response logs with the request-id generated for the uploads via Reply privately to author option?

For the client library, logging can be enabled by navigating to the Client libraries > Your client library (select Java) > Logging documentation, which you can access from this link

Regards,

Google Logo
Yasar
Google Ads API Team
 


ref:_00D1U1174p._5004Q2arAUA:ref

Danilo Mozeli

unread,
May 11, 2022, 11:29:39 AM5/11/22
to Google Ads API and AdWords API Forum
Hi Yasar,

Thanks for the response. I've enabled the logging in java using log4j-slf4j-impl.
When I execute the java class I'm no longer getting the warnings saying that the logging libraries were not setup. However, it is not showing any log in console of a file.

Is there any sample or detailed documentation that I can use to setup the log correctly when using the client libraries?

This is an example of my call:
java com.google.ads.googleads.examples.remarketing.AddCustomerMatchUserList -Dapi.googleads.maxLogMessageLength=-1 -Dlog4j.configurationFile="C:\ELC\Social\Google_Ads_New_18\command\log4j2.xml"


log4j2.xml - file below:

<!-- https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-slf4j-impl -->
<dependency>
    <groupId>org.apache.logging.log4j</groupId>
    <artifactId>log4j-slf4j-impl</artifactId>
    <version>2.17.2</version>
    <scope>test</scope>
</dependency>
   

Thanks,

Danilo

Danilo Mozeli

unread,
May 13, 2022, 8:31:32 AM5/13/22
to Google Ads API and AdWords API Forum

Hi,

Could this long time to execute a simple command be related to the accounts hierarchy levels We have in our Google Ads environment? There are several account hierarchies and hundreds of accounts, which are managed by our account manager that We are using to execute the API calls. 

Any help is greatly appreciate.

Best,

Danilo

Danilo Mozeli

unread,
May 13, 2022, 9:01:52 AM5/13/22
to Google Ads API and AdWords API Forum
The problem that I'm facing looks similar to the one below:

The difference is that in my case the long execution time is happening in the add user list command below:

      // Adds the user list.
      MutateUserListsResponse response =
          userListServiceClient.mutateUserLists        
          (
              Long.toString(customerId), ImmutableList.of(operation));
      // Prints the response.


Thanks,

Danilo

Google Ads API Forum Advisor

unread,
May 17, 2022, 10:35:58 PM5/17/22
to adwor...@googlegroups.com

Hi Danilo,

Thank you for the reply.

Can you confirm if you did reach out to the author of the Java client library to confirm this clarification like my colleague Jinky said? If yes, could you please elaborate on the details you gathered? Also, were there API logs (request and response with request-id ) that were generated containing errors? if yes, could you share those as well?

Best regards,

Google Logo
Heidi
Google Ads API Team
 


ref:_00D1U1174p._5004Q2arAUA:ref

Danilo Mozeli

unread,
May 18, 2022, 5:50:06 PM5/18/22
to Google Ads API and AdWords API Forum
Hi Heidi,

Thanks for the response.

I've provided the API logs to you privately. Can you please check and let me know what is wrong with the API calls?

Thanks,

Danilo
Reply all
Reply to author
Forward
0 new messages