seven1m/onebody

Families not Geocoding after starting import - OverQueryLimitError

Mbd06b opened this issue · 8 comments

Closest issue I could find was: #631
I've updated every family individually at least once, since I've manually imported family photos.
But still out of nearly 500 families, only 10 are geocoded. so I think there's a slightly different issue.

I'm running in a CentOS environment. I ran the following commands to investigate the typical family not geocoding.

`RAILS_ENV=production rails console 
2.3.3 :001 > fam = Family.find(42) 
  ####output omitted for privacy
2.3.3 :002 > fam.geocode
Geocoder::OverQueryLimitError: Geocoder::OverQueryLimitError
	from app/models/concerns/geocode.rb:21:in `geocode'
	from (irb):2
2.3.3 :003 > fam.latitude
 => nil 
2.3.3 :004 > fam.longitude
 => nil 
2.3.3 :005 > 

There is probably someway of re-running the Geocoder on the families. I will be trying to figure that out in the meantime.

Per the OverQueryLimitError
from: app/models/concerns/geocode.rb:21:in `geocode'

My installation clearly missed commit that happened 7 days ago that addressed some geocoding issues during import. I do not know if it would have fixed my issue.

Code Location:
https://github.com/seven1m/onebody/tree/master/app/models

Update:
I've crashed my installation, I've been on a 3.9-pre master build. I've done a git checkout master to capture the recent changes, which include updates to the Geocode bug, and have gone through a re-compiling process.

Phusion Passenger doesn't make it past the prebuild phase a drops me on a Passenger generated error screen, that fails on the setup_load_paths.rb .

Background:
To get Onebody running before on a RPM CentOS6 environment at Bluehost, I've used some convoluted cPanel documentation dealing with WHM and "Easy Apache 4", but I find very little documentation on actually running a rails console and doing development or ruby/rails troubleshooting in ea4.

Yesterday to get a functional ruby command line for troubleshooting I installed ruby 2.3.3 with rvm, and after the git checkout master ran the recompile phase of the Onebody. My guess is that this conflicted with the default ruby version the Easy Apache version of passenger. When Onebody tried to run after the recompile, the ea4 passenger mod likely got confused at which version of ruby to use, and I think that is what is triggering the failure. setup_load_paths.rb which deals specifically with loading rvm managed ruby (when avaliable).

Anyway... I would like a more robust way of using ruby, running Onebody and troubleshooting it without the "Easy" apache headaches. So I'll be working today on trying to get Onebody to launch with ruby and rails managed by RVM, and launched with whatever passenger_mod config will make my Apache happy.

Any advice would be great.

We have other ways of installing OneBody, including a Debian package. Manual install on CentOS is definitely going to take some fiddly work.

I'm afraid I don't have any specific advice for your situation. Getting bundle exec rails console to work would be the first step. Then you can move on to making Passenger happy.

@seven1m

Ok I've successfully reinstalled passenger and ruby now using rvm, and am still having difficulties, here's the error log.

  /home/username/public_html/family/onebody/config/setup_load_paths.rb:3:in `<top (required)>'
  /home/username/public_html/family/onebody/config/setup_load_paths.rb:9:in `rescue in <top (required)>'
[ E 2018-10-09 16:49:44.6498 4918/Ti age/Cor/App/Implementation.cpp:304 ]: Could not spawn process for application /home/username/public_html/family/onebody: An error occurred while starting up the preloader.

bundle exec rails console outputs

Not notifying due to an invalid api_key
/home/username/public_html/family/onebody/vendor/bundle/ruby/2.3.0/gems/mysql2-0.5.2/lib/mysql2/client.rb:131:in `_query': Mysql2::Error: Table 'username_onebody_dev.sites' doesn't exist: SHOW FULL FIELDS FROM `sites` (ActiveRecord::StatementInvalid)

Ok I got the console working with:

RAILS_ENV=production bundle exec rails console

I'm back up and running with the updated program files. But I still have only 10 geocoded families.

I'm not sure if this issue is still relevant... from reading back over it, I believe it was an older version and there were issues with the local install. Closing.