I’m not sure how to interpret the following error. What is the relationship of PID 0.553.0
to 0.2195.0
? It seems that 0.553.0
may be the test process in which case the error doesn’t make sense to me because (as I’m interpreting it) the client and the owner are the same process.
03:50:50.547 [error] Postgrex.Protocol (#PID<0.553.0>) disconnected: ** (DBConnection.ConnectionError) owner #PID<0.2195.0> checked in the connection
Client #PID<0.2195.0> is still using a connection from owner at location:
:prim_inet.recv0/3
(postgrex) lib/postgrex/protocol.ex:2701: Postgrex.Protocol.msg_recv/4
(postgrex) lib/postgrex/protocol.ex:2454: Postgrex.Protocol.recv_close/3
(postgrex) lib/postgrex/protocol.ex:1169: Postgrex.Protocol.close_parse_describe_flush/3
(postgrex) lib/postgrex/protocol.ex:1587: Postgrex.Protocol.handle_prepare_execute/4
(ecto_sql) lib/ecto/adapters/sql/sandbox.ex:375: Ecto.Adapters.SQL.Sandbox.Connection.proxy/3
(db_connection) lib/db_connection/holder.ex:268: DBConnection.Holder.holder_apply/4
(db_connection) lib/db_connection.ex:1189: DBConnection.run_execute/5
(db_connection) lib/db_connection.ex:1276: DBConnection.run/6
(db_connection) lib/db_connection.ex:550: DBConnection.execute/4
(ecto_sql) lib/ecto/adapters/postgres/connection.ex:80: Ecto.Adapters.Postgres.Connection.execute/4
(ecto_sql) lib/ecto/adapters/sql.ex:571: Ecto.Adapters.SQL.execute!/4
(ecto_sql) lib/ecto/adapters/sql.ex:553: Ecto.Adapters.SQL.execute/5
(ecto) lib/ecto/repo/queryable.ex:147: Ecto.Repo.Queryable.execute/4
(ecto) lib/ecto/repo/queryable.ex:18: Ecto.Repo.Queryable.all/3
test/hobnob_messages/queries/mentions_query_test.exs:101: HobnobMessages.Queries.MentionsQueryTest."test unread_in_threads_for_user/1 includes messages in threads when the user has no thread member"/1
(ex_unit) lib/ex_unit/runner.ex:312: ExUnit.Runner.exec_test/1
(stdlib) timer.erl:166: :timer.tc/1
(ex_unit) lib/ex_unit/runner.ex:251: anonymous fn/4 in ExUnit.Runner.spawn_test/3
The connection itself was checked out by #PID<0.2195.0> at location:
(ecto_sql) lib/ecto/adapters/postgres/connection.ex:80: Ecto.Adapters.Postgres.Connection.execute/4
(ecto_sql) lib/ecto/adapters/sql.ex:571: Ecto.Adapters.SQL.execute!/4
(ecto_sql) lib/ecto/adapters/sql.ex:553: Ecto.Adapters.SQL.execute/5
(ecto) lib/ecto/repo/queryable.ex:147: Ecto.Repo.Queryable.execute/4
(ecto) lib/ecto/repo/queryable.ex:18: Ecto.Repo.Queryable.all/3
test/hobnob_messages/queries/mentions_query_test.exs:101: HobnobMessages.Queries.MentionsQueryTest."test unread_in_threads_for_user/1 includes messages in threads when the user has no thread member"/1
(ex_unit) lib/ex_unit/runner.ex:312: ExUnit.Runner.exec_test/1
(stdlib) timer.erl:166: :timer.tc/1
(ex_unit) lib/ex_unit/runner.ex:251: anonymous fn/4 in ExUnit.Runner.spawn_test/3
The failure is intermittent but happens quite often on a full test run. I don’t get the same error on Ecto 2.2.11.
Environment:
- ecto: 3.0.6
- ecto_sql: 3.0.4
- postgrex: 0.14.1
- Elixir: 1.7.4
- Erlang: 21.0.4
- Mac OS X: 10.13.6