API failing in the mornings

47 views
Skip to first unread message

Watauga Group

unread,
Aug 10, 2022, 9:00:55 AM8/10/22
to Google Ads API and AdWords API Forum

Hello,

We currently have an API that runs in the morning. It has recently randomly started failing in the mornings. The ad dimension endpoint seems to be the point that it stalls (it doesn't raise an error, the process just freezes and doesn't progress).


Troubleshooting it is difficult because it doesn't fail every day, and when it does it is only in the mornings. 06:00 UTC - Fails, 08:45 UTC (Auto-Retry) - Fails, 12:00 UTC succeeds.


Example Query and Code (Python):

SELECT
customer.id,
customer.descriptive_name,
campaign.id,
campaign.name,
ad_group.id,
ad_group.name,
ad_group_ad.ad.name,
ad_group_ad.ad.id,
ad_group_ad.ad.type,
ad_group_ad.status,
campaign.start_date,
campaign.end_date,


ad_group_ad.ad.expanded_text_ad.description,
ad_group_ad.ad.text_ad.description1,
ad_group_ad.ad.text_ad.description2,
ad_group_ad.ad.text_ad.headline,
ad_group_ad.ad.expanded_text_ad.headline_part1,
ad_group_ad.ad.expanded_text_ad.headline_part2,
ad_group_ad.ad.expanded_text_ad.headline_part3,


ad_group_ad.ad.image_ad.name,
ad_group_ad.ad.expanded_text_ad.path1,
ad_group_ad.ad.expanded_text_ad.path2,
ad_group_ad.ad.final_urls,
ad_group_ad.ad.image_ad.image_url


FROM ad_group_ad



file_path = os.path.join(self.download_path, f"{customer_id}_ad_dimensions.csv")
if os.path.isfile(file_path):
os.remove(file_path)

try:
response = self.ga_service.search(
customer_id=str(customer_id), query=query
)
except google.ads.googleads.errors.GoogleAdsException:
response = None
pass

if response:
with open(file_path, 'a+') as f_object:
dictwriter_object = DictWriter(f_object, fieldnames=field_names)
dictwriter_object.writeheader()
for item in response:
ad = dict()
ad['resource_name'] = item.ad_group_ad.ad.resource_name
ad['id'] = item.ad_group_ad.ad.id
Message has been deleted

Google Ads API Forum Advisor

unread,
Aug 11, 2022, 4:29:09 AM8/11/22
to watau...@gmail.com, adwor...@googlegroups.com

Hi Watauga,

Thank you for reaching out to our API support team.

To investigate the issue further, could you please provide the complete request and response logs, with the request-id using our REST interface then in the full multi line curl command line is a request log and adding curl command line option '-i' will also generate a response log. In addition since you are using the Python client library, you may use this Python client library logging guide so that a complete request and response will be generated on your end. Once you get the complete request and response logs, then you may send them to us so we can continue our investigation.

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


Best regards,

Google Logo
Anthony Cyril
Google Ads API Team
 


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