Exception: Service invoked too many times for one day: geocode

posted Mar 27, 2014, 10:13 AM by Faustino Rodriguez   [ updated Mar 27, 2014, 10:13 AM ]
This is one of the two most common warnings, some users are getting. We are putting together some notes, references, and comments here for further reference, with the promise of updating this post as we learn more about this quota limit.

Is this a bug, an error, a malfunction of the Mapping Sheet add-on?
I would say, no.
However, it is a limitation, specially for Gmail accounts, when mapping "too many" markers at once (in one day).

This warning is related with the Google Geocoding service daily quota limit.

More details about Geocoding service daily quota:
  1. There is a daily quota limit on the number of calls to the Google Geocoding service (used to convert an address into numeric map coordinates, Latitude / Longitude) from each user
  2. When you hit that quota limit, there is not too much you can do, other than wait until next day
  3. Geocoding quota usually gets cleared after 24 hours or so.
What the add-on does to optimize the use of your Geocoding service quota?
  1. If the location (address) is empty (blank) in your data sheet, the add-on will not call the Geocoding service
  2. Only new addresses will call the Google Geocoding service and count against your quota, because the add-on keeps a hidden sheet with name Geocoding within your spreadsheet. This sheet is acting as a cache repository for all calculated coordinates (latitude, longitude). Find more details on this FAQ
  3. The add-on skips any address that won't return OK from the Geocoding service and keeps going, showing a "Warning: Problem mapping these addresses" when finished. Please, review and fix those addresses
Other recommendations around the Geocoding:
  1. If you haven't been able to see your map yet, because you have too many items in your list, check the Geocoding sheet to see how many you have already saved there, and have an idea on how long would be take
  2. If you get a "Warning: Problem mapping these addresses", please fix o clear them to avoid using your quota on those no valid addresses.
  3. If you already have the numeric map coordinates (Latitude and Longitude) for all or some of the items in your list, there is a way of using them, instead of calling the Geocoding service.
  4. If you hit that daily quota limit but you cannot wait until next day to complete your map: you can share the spreadsheet with another Google account (if you feel it's suitable) and continue / complete the Geocoding from there
Other things the add-on does to optimize the use of your Geocoding service:
  1. There is a small delay between each Geocoding calls, to avoid another possible quota limit ("Exception: Service invoked too many times in a short time: geocode"). Currently that delay is 100 ms, and so far we are not getting that error
  2. There is a cap on the number of Geocoding calls per session, just trying to stop before a possible quota limit, and also to avoid a timeout error. Currently that cap is 650 calls per session. If you hit that cap, you will get a "Warning: Too many calls in one session". Please, be aware that keep building the map after this warning, might get you to exceeding your daily quota limit