elixir-ecto / db_connection

Database connection behaviour
http://hexdocs.pm/db_connection/DBConnection.html
309 stars 112 forks source link

Support pgpool #192

Closed OpakAlex closed 5 years ago

OpakAlex commented 5 years ago

Hi guys, we trying to integrate some elixir / phoenix microservices into our infrastructure, and it seems we have issue with PGPOOL balancer. We created PR to postgrex for support PGPool, but now we have another issue:

17:26:25.101 [error] Postgrex.Protocol (#PID<0.591.0>) disconnected: ** (DBConnection.ConnectionError) tcp recv: closed
** (DBConnection.ConnectionError) tcp recv: closed
    (db_connection) lib/db_connection.ex:784: DBConnection.transaction/3
    (ecto_sql) lib/ecto/migrator.ex:192: Ecto.Migrator.run_maybe_in_transaction/5
    (elixir) lib/task/supervised.ex:89: Task.Supervised.do_apply/2
    (elixir) lib/task/supervised.ex:38: Task.Supervised.reply/5
    (stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3

When i try to run test i have this.

Any idea or any suggestion to support pgpool? Or the best idea back to good erlang epgsql?

epgsql works great with PGPOOL ;)

OpakAlex commented 5 years ago

@josevalim what do you think?

josevalim commented 5 years ago

We would appreciate pgpool support but we don't have the bandwidth to implement that ourselves. So if you run into issues, pull requests are welcome.

OpakAlex commented 5 years ago

we too man, we too, don't have the bandwidth to implement that.