Robust ping/reconnect: get_db() now retries ping multiple times and safely recreates the pool once per request.
Healthcheck thread: background daemon periodically pings connections and recreates the pool if needed.
Logging improvements: early pool creation and healthcheck logs appear via proper logger setup.