Conversation
Useful as options are emitted with :db_connection telemetry events. This would allow us to correlate telemetry events with the pool owner repo with ease.
Member
Author
|
Telemetry metadata with this change: metadata: %{
error: %DBConnection.ConnectionError{
message: "connection not available and request was dropped from queue after 2265ms. This means requests are coming in and your connection pool cannot serve them fast enough. You can address this by:\n\n 1. Ensuring your database is available and that you can connect to it\n 2. Tracking down slow queries and making sure they are running fast enough\n 3. Increasing the pool_size (albeit it increases resource consumption)\n 4. Allowing requests to wait longer by increasing :queue_target and :queue_interval\n\nSee DBConnection.start_link/2 for more information\n",
reason: :queue_timeout,
severity: :error
},
opts: [
log: #Function<14.35606316/1 in Ecto.Adapters.SQL.with_log/3>,
source: "my_schema",
repo: EctoBug.RepoWithInit,
timeout: 15000,
pool_size: 10,
pool: DBConnection.ConnectionPool
]
} |
Member
Author
|
Not 100% sure if this is desirable tho :)) |
josevalim
approved these changes
Nov 26, 2021
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.
Useful as options are emitted with :db_connection telemetry events.
This would allow us to correlate telemetry events with the pool owner repo with ease.
Related to discussion in elixir-ecto/db_connection#251