'Google Maps API Timeout Exception

I am trying to get elevation data set along a route using Google maps API python client. When i request for a thousand coordinates, after a certain limit, an exception is raised.

for i in range(1000):
   eljson = gmaps.elevation(list_coordinates[i])


**raise googlemaps.exceptions.Timeout()**

Is it because I'm exceeding usage of 2500 api requests or the rate of requests is high and have to slow down the requests per second ?



Solution 1:[1]

Most probably yes. You can verify it by logging into your account at below link

https://console.developers.google.com/iam-admin/quotas

Solution 2:[2]

I had a similar error, and after following suggestions online, still didn't figure out why that happened (didn't seem like I was blocked, or reached a maximum). for me the problem was that the internet connection was interrupted. Restarting the kernel solved the problem.

Friendly suggestion: if it was not already done, before you restart the kernel, save/export the points you already got, otherwise you'll have to call the api for them again... can sum-up if this is a reoccurring problem...

EDIT:
In fact, this doesnt fully solve the problem as I still get this error:

ConnectionError: ('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer'))

for this, the following was helpful: Python client error 'Connection reset by peer'

Solution 3:[3]

Between domains you wont have any tx support, which implies no relational integrity. If the question is how to connect Shop.Item with a Member.User as "seller" I would just add a property/field Shop.Item.Seller as a UUID/Guid and leave it to the application layer to "validate" the relationship and handle whenever the referenced Seller does not exist.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Priyank Mehta
Solution 2
Solution 3 Andreas Zita