facile-it/doctrine-mysql-come-back
A Doctrine DBAL extension that automatically reconnects to MySQL after connection loss and retries failed queries, helping long-running Laravel/PHP apps and workers recover from dropped database connections without manual reconnection handling.
wait_timeout or sit behind proxies/load balancers that reap idle connections.Consider it when:
doctrine/dbal incidentally for Laravel schema operations.Look elsewhere or solve differently when:
wait_timeout, pooling, or managed database failover.For executives: This is a low-cost reliability hardening option for PHP services that occasionally lose MySQL connections. It can reduce failed background jobs and transient errors without a customer-facing feature build, but it is a narrow technical dependency—not a strategic platform investment. Approve a small pilot with success metrics: fewer reconnect-related incidents, lower failed-job rates, and no increase in duplicate-write or transaction errors.
For engineering: The package is a targeted Doctrine DBAL reconnect wrapper for MySQL “gone away” exceptions. Adopt it only where Doctrine DBAL is the real runtime data layer, put it behind the standard connection factory, and instrument reconnect attempts and outcomes. Validate behavior around transactions, non-idempotent writes, and retries before enabling broadly. For standard Laravel/Eloquent workloads, prefer Laravel-native reconnect behavior, queue retries/backoff, and infrastructure-level keepalives. Treat this as a focused mitigation with clear ownership, version pinning, and rollback criteria—not a blanket query-retry mechanism.
How can I help you explore Laravel packages today?