Exceeded maximum execution time(line 0)
Closed this issue · 1 comments
Make sure you have the latest version of code, I've updated it 3d ago:
https://raw.githubusercontent.com/Eloise1988/COINGECKO/master/CoinGeckoV2.gs
Also:
Google Sheets has API limits.
For Google Limits:
https://developers.google.com/sheets/api/limits
https://developers.google.com/apps-script/guides/services/quotas
If you want to trouble shoot the functions to see where it goes wrong, a first step is to go and app-script and get the error message which should give you more information.
Limits are per account not per sheet.
Functions will go back to normal in a couple of hours when Google resets your daily limits.
Tips:
1- delete all formulas that have duplicates and reference just one of them instead of calling 10 times the same formula
2- batch refreshes into multiple calls of 20. Google only accepts 30 refreshes of formula at once.
3-check in spreadsheet setting/calculation/recalculation isn't done every minute
4- check in tools/script editor/overview your overall function consumption with error rate. It will guide you on understanding where you stand in terms of limits with Google
5- getting a premium account on Google also helps but it's 5euros a month... You can cancel the subscription at any moment if it doesn't help. Even with premium account you are limited..
It should help you not trigger the #ERROR maximum execution exceeded.
When you get errors and think Cryptotools functions are down, you can check their operational status here:
https://stats.uptimerobot.com/NWoqAINy4q
Also Coingecko:
Their API terms of services:
"4.2 Rate limit for the CoinGecko API is 10 calls each second per Internet Protocol (“IP”) address"
The issue is that Google Sheets uses the same set of IP addresses which is limited.
I believe this is why most of us are hitting the google limits very fast, the functions will call back CoinGecko until it gets an answer, sometimes it calls it 7 times before it can go through. As a result, we hit our daily google limits and don't have any access to the data for 24h.