Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Doctrine Mysql Come Back Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Reliability roadmap: Decide whether reducing transient MySQL failures is worth a platform-hardening sprint. This package targets “MySQL server has gone away” errors, which often surface as failed queue jobs, dropped requests, broken scheduled tasks, and noisy on-call alerts.
  • Long-running process strategy: Supports decisions about running Laravel/PHP workloads under Octane, Swoole, RoadRunner, queue workers, schedulers, websocket servers, or long CLI imports where database connections outlive MySQL’s wait_timeout or sit behind proxies/load balancers that reap idle connections.
  • Build vs. buy: If the runtime already uses Doctrine DBAL, this is a small Apache-licensed package that may be cheaper than building and maintaining custom reconnect logic. If the application is a conventional Laravel/Eloquent app using PDO, this package is likely not the right layer; invest in Laravel-native reconnect/retry patterns, infrastructure keepalives, or queue retry policy instead.
  • Incident reduction and SLO support: Provides a targeted mitigation for a known failure mode. It should be evaluated as one control in a broader availability plan, not as a substitute for database HA, failover, connection pooling, health checks, or idempotent job design.
  • Feature and use-case fit: Most relevant for Doctrine ORM/DBAL services, Laravel modules that genuinely use Doctrine DBAL at runtime, batch imports, reporting jobs, queue consumers, and internal admin tools with long-lived connections. Less relevant for short-lived request/response apps with healthy connection lifecycles.
  • Support matrix and dependency policy: The package is niche, modestly adopted, and recently released. Adoption should include ownership, version pinning, and a fallback plan. Do not make it a foundational dependency without confirming maintenance expectations and compatibility with the team’s Doctrine DBAL version.

When to Consider This Package

Consider it when:

  • The application uses Doctrine DBAL for runtime database access, not just doctrine/dbal incidentally for Laravel schema operations.
  • The production database is MySQL or a MySQL-compatible service, and “server has gone away” or idle-connection disconnects are a recurring operational issue.
  • Workloads include long-lived PHP processes: queue workers, Octane-style servers, cron jobs, import/export jobs, or services behind connection-reaping infrastructure.
  • The team wants a small, focused, Apache-licensed dependency rather than owning a custom reconnect wrapper.
  • Reconnect semantics can be tested against the application’s transaction, write, and idempotency requirements.
  • The team can add observability around reconnect attempts and failures, and can pin versions while monitoring releases.

Look elsewhere or solve differently when:

  • The Laravel app uses Eloquent/PDO only. This package operates at the Doctrine DBAL layer and will not automatically harden typical Laravel database connections.
  • The main risk is non-idempotent writes or in-flight transactions. Blind reconnect-and-retry can duplicate side effects or hide data-integrity problems.
  • The issue can be fixed more cleanly through infrastructure: connection keepalives, load-balancer idle timeouts, MySQL wait_timeout, pooling, or managed database failover.
  • The team needs cross-database support, vendor-backed SLAs, or a broad data-access abstraction.
  • The organization cannot accept a small, niche dependency in a critical path without a fork/vendor contingency.

How to Pitch It (Stakeholders)

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.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle
adachsoft/api-version-bundle
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
cgv/localized-resource