[Resolved] Google Maps Geocoding API generates a huge number of requests
This thread is resolved. Here is a description of the problem and solution.
Problem:
Google Maps Geocoding API generates a huge number of requests
Solution:
Please make sure that you did not deleted the cache entry from maps address cache or entries from "toolset_maps_address_cache" database table.
Hi, in the past few days, Geocoding API generates a huge number of requests.
Around 3000 per day, compared to around 80 before.
There's no increase in the number of visitors.
Regardless of this ticket, please note that sometimes when I try to open a support ticket, I only have a chat option. The chat never works and after a while, I get an option to open a ticket using email, but when I click that option I get a 404 page.
Another thing is that, you should make sure there is no bot running on your site that uses the map API as Toolset's role is to offer the the map feature offered by google.
You may try to add your custom search which have address field search for loggedin users only to make sure there is no spam requests.
Please note that I don't have an address search option, I only display places on a map. Could you please explain how I can make the map visible only to registered users?
Regarding the bot. If there was some bot running on my site, wouldn't I see an increase in the number of visitors to my site?
Regarding the bot. If there was some bot running on my site, wouldn't I see an increase in the number of visitors to my site?
==>
I'm not sure as I honestly I do not have any expertise exploring bot, maybe google support should answer this question in this regard.
I spoke with Google support.
They told me that my Geocoding requests are actually being generated from the server side.
They asked me for a list of servers' IPs.
I'm checking with my hosting provider, but wanted to ask if it might be related to Toolset servers. Is there any communication with Toolset servers for that process?
Toolset uses the custom table to store the address field value to the database table "toolset_maps_address_cache " that will help to minimize the number of map request if the address is available in cache table. Toolset uses
=> https://toolset.com/course-lesson/data-caching-for-maps-addresses/
I can't check which IP causes this. Google won't tell me the IP as it's private data. They asked me to tell them the IP of the servers I work with.
There's a good chance it's my hosting provider. Do the API requests arrive from the hosting server or from the user's IP?
Also, when I clear the site cash, does it delete the addresses database Toolset store? If so, that might explain the increase, as I was clearing cash many times in the past few days.
Yes, clearing the cache means if address is not found in "toolset_maps_address_cache " table, then it will fire the request so as you said that explains why the number of request is raised.
When you try to load the page/post that holds the address field, Toolset first look the cache table, if its available in cache table then it wont fire the google request to fetch the address field information, if the address is not found then it will fire the request.