added activerecord connection management to handle errors with connection timeouts