0

I have been running into this issue while trying to call Google Maps Api in my demo environment. The api works fine on my production which is odd because they are exactly the same right now

I have set the timeout limit but am still getting the same issue. I have also tried changing from freegeoip to a different ip_lookup and that did not work either. Please let me know if there is any information I can provide to help debug this problem. Thanks

config/initializers/geocoder.rb

Geocoder.configure(
  # geocoding options
  timeout: 15, # geocoding service timeout (secs)
  lookup: :google, # name of geocoding service (symbol)
  # :language     => :en,         # ISO-639 language code
  # :use_https    => false,       # use HTTPS for lookup requests? (if supported)
  # :http_proxy   => nil,
  # :https_proxy  => nil,
  api_key: APIKEY,
  cache: Rails.cache, # cache object (must respond to #[], #[]=, and #keys)
  cache_prefix: 'geocoder:', # prefix (string) to use for all cache keys
  ip_lookup: :freegeoip,

  # exceptions that should not be rescued by default
  # (if you want to implement custom error handling);
  # supports SocketError and TimeoutError
  # :always_raise => [],

  # calculation options
  units: :km # :km for kilometers or :mi for miles
  # :distances => :linear    # :spherical or :linear
)
2
  • Please provide enough code so others can better understand or reproduce the problem. Commented Apr 8 at 15:42
  • 1
    The timeliness of a response from any given API is not something that we can "debug". It could be any number of things including your internet connection or means of connecting (e.g. VPN), traffic filtering, request throttling, degradation of the API itself, current traffic volume being experienced by the API servers, the server you are connecting to, environment (e.g. a uat/sandbox server, vs a production server)... If you truly believe there is an issue, you could reach out to the provider of the API, but unfortunately no amount of analysis here is likely to result in a faster response. Commented Apr 8 at 16:53

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.