Skip to content

[7.x] Add PDOException's try again as a lost connection message - #32544

Merged
taylorotwell merged 1 commit into
laravel:7.xfrom
IanBrison:pdo-try-again
Apr 26, 2020
Merged

[7.x] Add PDOException's try again as a lost connection message#32544
taylorotwell merged 1 commit into
laravel:7.xfrom
IanBrison:pdo-try-again

Conversation

@IanBrison

Copy link
Copy Markdown
Contributor

Since switching to AWS Fargate, we started to encounter the error below time to time when connecting to the databases. It just suddenly comes out from nowhere and disappears in a second or so.

SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Try again (SQL: select * from this_is_an_example)

Of course we are investigating what's going on under there, but at the same time, I feel that Laravel should retry to create connection since it's saying "try again".

I added the whole message including SQLSTATE[HY000] [2002] since there was a discussion taken place before, claiming there was a side effect when the message was too general.
( added here #25289, but reverted here #27053 )

@taylorotwell
taylorotwell merged commit 67ee649 into laravel:7.x Apr 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants