Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Script *Deployments* break and cause scripts to run into timeouts without doing anything

86 views
Skip to first unread message

Lennart Spengler

unread,
Jan 27, 2025, 7:22:34 PMJan 27
to Google Ads Scripts Forum
Hi all,

I have observed that entire scripts deployments just stop working for no apparent reason.

Specific case details:
  • MCC Id: 6096591137
  • Script Id: 6677341
  • I added a new file test_run.gs with a new main function to log "hello" for testing purposes and confirming that the script is broken. The original function is in the Code.gs.

My investigation:
  1. I know that the specific deployment is broken, because the exact same code runs fine (within 30 seconds) in a new deployment - working script id: 8786080. 
  2. It is not a workload issue, even just a 1 liner Logger.log("hello") runs into a timeout in the broken deployment.
  3. It doesn't matter wether the script processes one or multiple sub-accounts

My suspicion:
  • The script runs in a rather large MCC (300+ customer accounts) with 30+ active scripts. Can the total number of customer accounts or number of active scripts cause this?

@ the official support team: 
Can you confirm that this specific script deployments can just break down over time? Can the size of the MCC or the number of active scripts cause this? 
Is the only solution to create a new deployment? 

@ community: Have you had this problem as well? Any insights you can share?


Best,
Lennart


Google Ads Scripts Forum Advisor

unread,
Jan 27, 2025, 11:30:50 PMJan 27
to adwords...@googlegroups.com

Hi Lennart,

Thank you for reaching out to the Google Ads Scripts support team.

I would like to inform you that the total number accounts or scripts won’t cause this issue also, there is no specific breakdown time for deployed scripts.

Regarding this issue, I have raised your concern with the rest of my team and one of my team members will get back to you with updates on this issue. Meanwhile, your patience is highly appreciated. 

This message is in relation to case "ref:!00D1U01174p.!5004Q02vGyi5:ref" (ADR-00286078)

Thanks,
 
Google Logo Google Ads Scripts Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5



Nils Rooijmans

unread,
Jan 28, 2025, 2:43:50 AMJan 28
to Google Ads Scripts Forum
Hi Lennart,

I've seen this happen for some scripts in the past. Most of the times it was a very old script that had been running for years. I am not sure about the cause of the issue, but simply copy-pasting the code to a newly created script,  and then authorizing the new script usually did the trick for me.

Hope this helps,

Nils Rooijmans
https://nilsrooijmans.com
See my Google Ads Scripts FAQ to avoid the same mistakes I made: https://nilsrooijmans.com/google-ads-scripts-faq/

Google Ads Scripts Forum Advisor

unread,
Feb 6, 2025, 2:56:01 PMFeb 6
to adwords...@googlegroups.com

Hi Lennart,

We have an update on the issue.

I would suggest that you just use the exportToSheet method on the report to dump the values into a spreadsheet instead of using the ‘setValues’ method. 

If you still want to use the 'setValues' method, I would recommend that you try batching up the work -- e.g. stash the rows into an array and then only write to the spreadsheet once every 100 rows or so. It may also make sense to have a console.log report progress every so often.

I hope this helps! Kindly follow the above steps and let us know how it goes on your end. 

Attila Polyák

unread,
Feb 11, 2025, 4:40:06 AMFeb 11
to Google Ads Scripts Forum
Hi Lennart!

I've encountered something similar, but never with new scripts. The reason why old scripts can have this issue is that each Google Account has quite a few limits, one of which is basically how many connected third party apps and services you can have in your account. Note: this is a Google Account limit not a Google Ads account limit. If I remember correctly this is something like 200 per Google Account, but to be honest I didn't find this now in the related documentation. You can find the connected third party apps by visiting https://myaccount.google.com/, clicking Data & Privacy, scrolling down to the "Data from apps and services you use" section and clicking "Third-party apps and services". You can manage your Google Account's data sharing with third parties here. Why is this important? Basically every Google Ads Script you use is a "third party" from your Google Account's point of view and needs authorization to run on your behalf and you can check what scripts (and a lot of other stuff as well) you have authorized in the " Third-party apps and services" section of your Google Account. If your were to excede the limit here the old connections are deleted in your Google Account, but your Google Ads Script will not know of this, and without authorization it'll simply hang and do nothing.

This is however definitely not the case for newly created scripts, and unfortunately I also have a few cases where newer deployments simply refuse to run. Oddly enough I only found this issue to occur when I manually run a script, not when there is a scheduled run, but this might just be coincidence.

Reply all
Reply to author
Forward
0 new messages