From aadf892a71f6db4f7f1e0d961bfc4d7296fa2b59 Mon Sep 17 00:00:00 2001 From: Uku Taht Date: Thu, 6 Oct 2022 14:17:35 +0300 Subject: [PATCH] Increase DB query timeout for site transfers (#2309) --- lib/plausible/site/admin.ex | 4 ++-- mix.lock | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/plausible/site/admin.ex b/lib/plausible/site/admin.ex index 8cf6933c2..fc6b0d398 100644 --- a/lib/plausible/site/admin.ex +++ b/lib/plausible/site/admin.ex @@ -72,10 +72,10 @@ defmodule Plausible.SiteAdmin do if to_site do event_q = event_transfer_query(from_site.domain, to_site.domain) - {:ok, _} = Ecto.Adapters.SQL.query(Plausible.ClickhouseRepo, event_q) + {:ok, _} = Ecto.Adapters.SQL.query(Plausible.ClickhouseRepo, event_q, [], timeout: 30_000) session_q = session_transfer_query(from_site.domain, to_site.domain) - {:ok, _} = Ecto.Adapters.SQL.query(Plausible.ClickhouseRepo, session_q) + {:ok, _} = Ecto.Adapters.SQL.query(Plausible.ClickhouseRepo, session_q, [], timeout: 30_000) start_date = Plausible.Stats.Clickhouse.pageview_start_date_local(from_site) diff --git a/mix.lock b/mix.lock index ed247b63f..89bedfc7c 100644 --- a/mix.lock +++ b/mix.lock @@ -12,7 +12,7 @@ "certifi": {:hex, :certifi, "2.9.0", "6f2a475689dd47f19fb74334859d460a2dc4e3252a3324bd2111b8f0429e7e21", [:rebar3], [], "hexpm", "266da46bdb06d6c6d35fde799bcb28d36d985d424ad7c08b5bb48f5b5cdd4641"}, "chatterbox": {:hex, :ts_chatterbox, "0.11.0", "b8f372c706023eb0de5bf2976764edb27c70fe67052c88c1f6a66b3a5626847f", [:rebar3], [{:hpack, "~>0.2.3", [hex: :hpack_erl, repo: "hexpm", optional: false]}], "hexpm", "722fe2bad52913ab7e87d849fc6370375f0c961ffb2f0b5e6d647c9170c382a6"}, "clickhouse_ecto": {:git, "https://github.com/plausible/clickhouse_ecto.git", "43126c020f07b097c55a81f68a906019fd061f29", []}, - "clickhousex": {:git, "https://github.com/plausible/clickhousex", "490e9b2b3227abad4e68175f9dba114f83520837", []}, + "clickhousex": {:git, "https://github.com/plausible/clickhousex", "e6b7cc5a1ea7bb26d77af8fdae03952f662469af", []}, "combination": {:hex, :combination, "0.0.3", "746aedca63d833293ec6e835aa1f34974868829b1486b1e1cb0685f0b2ae1f41", [:mix], [], "hexpm", "72b099f463df42ef7dc6371d250c7070b57b6c5902853f69deb894f79eda18ca"}, "combine": {:hex, :combine, "0.10.0", "eff8224eeb56498a2af13011d142c5e7997a80c8f5b97c499f84c841032e429f", [:mix], [], "hexpm", "1b1dbc1790073076580d0d1d64e42eae2366583e7aecd455d1215b0d16f2451b"}, "comeonin": {:hex, :comeonin, "5.3.3", "2c564dac95a35650e9b6acfe6d2952083d8a08e4a89b93a481acb552b325892e", [:mix], [], "hexpm", "3e38c9c2cb080828116597ca8807bb482618a315bfafd98c90bc22a821cc84df"},