On OperationalError, sql_update and run_sql_select were calling sql_connect() → reconnect_db() which disposes the entire connection pool mid-flight, killing other in-flight connections under concurrency. Removed the sql_connect() calls; the existing retry blocks already open a fresh engine.connect() context manager, and pool_pre_ping=True handles stale connection detection. Also drops the now-unused sql_connect import. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
15 KiB
15 KiB