Hi, I’m working with a Postgres database which tends to take really long to retrieve data, it’s a simple :read
action with a filter. There are no optimisations to the database that can be done on my side and so I’m looking to increase the timeout when querying the AshPostgres.Repo to avoid this error:
Postgrex.Protocol (#PID<0.359.0>) disconnected: ** (DBConnection.ConnectionError) client #PID<0.739.0> timed out because it queued and checked out the connection for longer than 15000ms
I have tried setting timeout to :infinity in config/dev.exs
as so:
config :hachiware, Hachiware.Reports.Repo, hostname: "hachiware-db", username: "postgres", password: "postgres", database: "postgres", port: 5432, show_sensitive_data_on_connection_error: true, pool_size: 10, timeout: :infinity
On the repo:
use AshPostgres.Repo, otp_app: :hachiware, timeout: :infinity
On the domain:
execution do timeout :infinity end
As well as on the Ash.read! action:
__MODULE__ |> Ash.read!(timeout: :infinity)
However it feels that nothing I’m doing works at all, any advice and help is appreciated!