Repository navigation
[13.x] Recognize PgBouncer SSL EOF failover errors as lost connections - #61918
Merged
Merged
Conversation
|
Thanks for submitting a PR! Note that draft PRs are not reviewed. If you would like a review, please mark your pull request as ready for review in the GitHub user interface. Pull requests that are abandoned in draft may be closed due to inactivity. |
0x15f
marked this pull request as ready for review
October 7, 2026 14:23
binaryfire
added a commit
to hypervel/components-backup
that referenced
this pull request
Oct 26, 2026
Apply laravel/framework#61918 (38006c1ca5). Match the SSL SYSCALL EOF fragment even when PostgreSQL adds a server-crash or idle-timeout message before it. Preserve the PDO/explicit-driver boundary and query-context unwrapping. Port all three messages and the unrelated-EOF negative case. The database suite, formatting and full analysis pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PgBouncer can insert a FATAL reason before PostgreSQL's SSL EOF message. Laravel currently recognizes:
The following messages observed in production do not match that contiguous substring:
This replaces the existing signature with
SSL SYSCALL error: EOF detected. The suffix remains specific to PostgreSQL/libpq SSL transport errors; it does not match generic EOF text. These formatting variants can consequently use the existing lost-connection handling, subject to Laravel's existing transaction and retry rules. No retry policy is changed.Related: #32697, which introduced the existing signature and mentioned the shorter suffix.
Regression tests preserve the original message, cover both PgBouncer variants, and reject an unrelated application EOF exception. Both PgBouncer cases fail before the change and pass afterward.
Validation:
vendor/bin/phpunit --bootstrap vendor/autoload.php tests/Database/DatabaseConnectionLostTest.php— 9 tests, 9 assertions passed.vendor/bin/pint --test src/Illuminate/Database/LostConnectionDetector.php tests/Database/DatabaseConnectionLostTest.php— passed.git diff --check— passed.The separate
server_login_retrysignature is intentionally left for a follow-up with its own complete exception example.