cpursley / walex

Postgres change events (CDC) in Elixir
MIT License
276 stars 14 forks source link

pg_restart: handle case of using docker-compose.dbs.yaml #55

Closed DaemonSnake closed 3 months ago

DaemonSnake commented 3 months ago

database_test fails early if postgres was setup using the docker-compose.dbs.yaml of the repo, handle this case

can saddly be somewhat flacky with the following error if the restart takes too long:

     ** (DBConnection.ConnectionError) connection not available and request was dropped from queue after 2147ms. 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

also fixed lib/mix/tasks/helpers.ex when using the docker compose