mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-01-19 11:45:10 +08:00
## Problem When database connection is lost, the reconnection logic had a bug: if the first reconnect attempt failed, the second attempt was not wrapped in error handling, causing unhandled exceptions. ## Solution Added proper try-except blocks around the second reconnect attempt in both MySQL and PostgreSQL database classes to ensure errors are properly logged and handled. ## Changes - Fixed `_handle_connection_loss()` in `RetryingPooledMySQLDatabase` - Fixed `_handle_connection_loss()` in `RetryingPooledPostgresqlDatabase` Fixes #12294 --- Contribution by Gittensor, see my contribution statistics at https://gittensor.io/miners/details?githubId=158349177 Co-authored-by: SID <158349177+0xsid0703@users.noreply.github.com>