modified application so as  point to ec2 elasic ip.
Try sending visit data and if fails then save to local db.