Skip to content

Could we have DBConnection.ConnectionError show us which Repo did it tried to check out? #325

@georgeguimaraes

Description

@georgeguimaraes
DBConnection.ConnectionError: connection not available and request was dropped from queue after 403ms. This means requests are coming in and your connection pool cannot serve them fast enough. You can address this by:

  1. Ensuring your database is available and that you can connect to it
  2. Tracking down slow queries and making sure they are running fast enough
  3. Increasing the pool_size (although this increases resource consumption)
  4. Allowing requests to wait longer by increasing :queue_target and :queue_interval

See DBConnection.start_link/2 for more information

  File "lib/db_connection.ex", line 1088, in DBConnection.transaction/3
  ....

I can assume the Repo based on the file/line from the stack trace, but is there a way for ConnectionError to know the name of the Repo and show us in the title? Would be very helpful. We have 4 Repos, 2 for the same database.

Would you be interested in a PR?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions