-
Notifications
You must be signed in to change notification settings - Fork 11.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[6.x] Retry connection if DNS lookup fails #35790
Merged
Merged
Conversation
This file contains 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
Thanks @deleugpn! We're going crazy 🎉 about this in the Serverless Laravel Slack group 😂 |
rihardsgrislis
pushed a commit
to rihardsgrislis/framework
that referenced
this pull request
Feb 24, 2021
… then this pops out. After seeing laravel#35744, laravel#35790 and others decided to fix this. PDOException: ```SQLSTATE[08006] [7] could not translate host name "private-xxx-do-user-0.a.db.ondigitalocean.com" to address: Temporary failure in name resolution```
rihardsgrislis
pushed a commit
to rihardsgrislis/framework
that referenced
this pull request
Feb 24, 2021
… then this pops out. After seeing laravel#35744, laravel#35790 and others decided to fix this. PDOException: SQLSTATE[08006] [7] could not translate host name "private-xxx-do-user-0.a.db.ondigitalocean.com" to address: Temporary failure in name resolution
rihardsgrislis
pushed a commit
to rihardsgrislis/framework
that referenced
this pull request
Feb 24, 2021
… then this pops out. After seeing laravel#35744, laravel#35790 and others decided to fix this. PDOException: SQLSTATE[08006] [7] could not translate host name "private-xxx-do-user-0.a.db.ondigitalocean.com" to address: Temporary failure in name resolution
This was referenced Mar 11, 2021
This was referenced Mar 16, 2021
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.
Resubmit of #35786
Recently I've been investigating some connection failures:
Upon investigation, I noticed that this happened about 36 times out of 130,396 requests in. Although extremely low (0.02%), it is still quite disruptive to have some requests throwing 500 Internal Server Error and writing database connection logs.
AWS Support has informed that due to transient network issues, it is possible that an extremely small number of connections to RDS or Elasticache might fail and that their engineers are always working on trying to reduce even further these errors. Since it's a rare event of connectivity issues, retrying the connection seem to be a viable option and doing this on my own project seems to be so much harder than using Laravel's built-in system for reconnection.