Exponential backoff strategy with retries for database connection.