Rails Geokit Too Many Queries Error

柔情痞子 提交于 2020-01-06 06:53:55

问题


I was trying to do a little app to test the gem "geokit", "~> 1.8.4"

It was working at the beginning but then started raising this error

Geokit::Geocoders::TooManyQueriesError

at most I did 100 queries with this line of code

suggested_bounds = Geokit::Geocoders::GoogleGeocoder.geocode(params[:location])

Can anyone help me

Thank you


回答1:


Google has a limit of 2,500 requests per 24 hour period.

I think they also restrict it if you do too many in a short like (like many within a second).

Are you doing that many in a short period (e.g. many in a second)



来源:https://stackoverflow.com/questions/21347517/rails-geokit-too-many-queries-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!