insert_or_merge_geo() was maybe being called with the wrong args in one locations, causing some of the trouble with exceptions and non objects...maybe.
adding locking to the db interactions to prevent collisions when running multiple processes.