I am getting connection dropped error messages even for small-time ~100ms as well.
Below is the stack trace
(DBConnection.ConnectionError) connection not available and request was dropped from queue after 175ms. This means requests are coming in and your connection pool cannot serve them fast enough. You can address this by: 1. By tracking down slow queries and making sure they are running fast enough 2. Increasing the pool_size (albeit it increases resource consumption) 3. Allow requests to wait longer by increasing :queue_target and :queue_interval See DBConnection.start_link/2 for more information
(ecto_sql) lib/ecto/adapters/sql.ex:612: Ecto.Adapters.SQL.raise_sql_call_error/1
(ecto_sql) lib/ecto/adapters/sql.ex:545: Ecto.Adapters.SQL.execute/5
(ecto) lib/ecto/repo/queryable.ex:192: Ecto.Repo.Queryable.execute/4
(ecto) lib/ecto/repo/queryable.ex:17: Ecto.Repo.Queryable.all/3
(ecto) lib/ecto/repo/queryable.ex:112: Ecto.Repo.Queryable.one/3
(diamond) lib/diamond/models/query_functions/rule_set_version.ex:10: Diamond.QueryFunctions.RuleSetVersion.find_by_id/2
(diamond) lib/diamond/models/query_functions/rule_set_version.ex:63: Diamond.QueryFunctions.RuleSetVersion.find_by_id_with_dependencies/1
(diamond) lib/diamond/concepts/rule_set/evaluator.ex:372: Diamond.Concepts.RuleSet.Evaluator.fetch_version/2
As you can see it is just 175ms and it got a timeout.
My config
config :diamond, Diamond.Repo,
username: System.get_env("RULES_ENGINE_DATABASE_USER"),
password: System.get_env("RULES_ENGINE_DATABASE_PASSWORD"),
database: System.get_env("RULES_ENGINE_DATABASE_NAME"),
hostname: System.get_env("RULES_ENGINE_DATABASE_HOST") || "localhost",
pool_size: 15,
migration_source: "ecto_schema_migrations"
Please help.