Postgresql 无法确定postgres超时的来源
我有一个移动应用程序(C#),它使用phoenix和Exto调用API 此API多次调用postgres数据库。每次通话持续约60毫秒,我们对数据库进行约25次通话 但在某个时刻,我从数据库得到了一个超时 以下是postgres错误:Postgresql 无法确定postgres超时的来源,postgresql,elixir,ecto,Postgresql,Elixir,Ecto,我有一个移动应用程序(C#),它使用phoenix和Exto调用API 此API多次调用postgres数据库。每次通话持续约60毫秒,我们对数据库进行约25次通话 但在某个时刻,我从数据库得到了一个超时 以下是postgres错误: 2020-06-04 09:40:03.503 CEST [24455] postgres@view_models ERROR: canceling statement due to user request 2020-06-04 09:40:03.503 CE
2020-06-04 09:40:03.503 CEST [24455] postgres@view_models ERROR: canceling statement due to user request
2020-06-04 09:40:03.503 CEST [24455] postgres@view_models STATEMENT: SELECT DISTINCT ON (i0."intervention_id") i0."intervention_id" FROM "interventions" AS i0 LEFT OUTER JOIN "appointments" AS a1 ON a1."intervention_id" = i0."intervention_id" WHERE ((i0."account_id" = $1) AND ((i0."updated_at" > $2) OR (a1."updated_at" > $3))) LIMIT 1
2020-06-04 09:40:03.504 CEST [24455] postgres@view_models LOG: could not send data to client: Broken pipe
2020-06-04 09:40:03.504 CEST [24455] postgres@view_models FATAL: connection to client lost`
以下是EXTO错误:
DBConnection.ConnectionError: tcp recv: closed (the connection was closed by the pool, possibly due to a timeout or because the pool has been terminated)
postgres语句\u tiemout参数为0
以下是EXTO配置:
config :query_backend, QueryBackend.V1.Repo,
username: System.get_env("POSTGRES_USERNAME"),
password: System.get_env("POSTGRES_PASSWORD"),
database: System.get_env("VIEW_POSTGRES_DB_NAME"),
hostname: System.get_env("POSTGRES_HOST"),
pool_size: 10,
queue_target: 3_000,
queue_interval: 15_000,
connect_timeout: 20_000,
timeout: 30_000
在移动设备上,HTTP客户端超时为15秒
此问题仅由我们的客户重现,我们的技术团队无法重现
你能告诉我我的配置是否有效吗?超时的起源是什么?移动HTTP客户端、Ecto、Postgres
提前感谢您的帮助
致以最良好的祝愿
Julien。数据库没有超时。它似乎是来自你的池,或者可能根本不是一个超时,但提到的另一件事。你没有从数据库中获得超时。这似乎是来自你的池,或者可能根本不是一个暂停,但另一件事提到。