Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sc1ZO-003I61-Lh for pgsql-general@arkaria.postgresql.org; Thu, 08 Aug 2024 11:44:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sc1ZN-00DkuT-0a for pgsql-general@arkaria.postgresql.org; Thu, 08 Aug 2024 11:44:37 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sc1ZM-00DkuK-Ck for pgsql-general@lists.postgresql.org; Thu, 08 Aug 2024 11:44:36 +0000 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sc1ZJ-003hSb-5Q for pgsql-general@lists.postgresql.org; Thu, 08 Aug 2024 11:44:34 +0000 Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-5a1f9bc80e3so328510a12.2 for ; Thu, 08 Aug 2024 04:44:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=peoplecall-com.20230601.gappssmtp.com; s=20230601; t=1723117471; x=1723722271; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Mr9c93MWsT8RVK0F1644HZ/LjHj/uVrZdh9Sn9vwLro=; b=lH9BIYvcFbwiLKOJcrrFktEnIiwmBld71t3JMqKf87bCU4hrXfdTYcbQd0SzroXodD wl9/TK89LWnqqE1u7bez5oIYAIXBIDsZ0FG0cHgrK9E+MkRtQavjy1J/VhF+JYKLh/68 ZT7q/OmnWP8+6eVXpMg5/+tbtSyUu1vnxZo1o2Um8mHNx9TJjtDbo9jX3OJ6/0obKj1r ybzI+kw8Y7PZ8rI84aJufUoQfwkhA9h8gYafwX/m29sggziJfFN2Ofjqx+NzSMh/ruBj zAyiqLeiHdM00Uhd3UNqhiJmi0v0RRXog83M/A6sx4K2NOrDsvQYm6KR6GnQIlxTZdiC 7evw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723117471; x=1723722271; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Mr9c93MWsT8RVK0F1644HZ/LjHj/uVrZdh9Sn9vwLro=; b=faVjh67qLIim9TruMwA3etZtz8iVcgWjCkp25IG8xoYDSs9b9WVt9THy7u3zOzrmoU aii0fPjcyFUpDy6K2O6BB813qTTLTB5eA2ZBJuztwBw7+fmQru2XCV/f9OgYzwGyQS/s A26rrleyn/K0aqeTkiqWssqkrw/xUvHiSW5h80p8VWmRQn7MoGBdWYCvBcENdH+NB4fn BhO8FM/5NXyYvv0FUwa5jzHyjZNK1rr3efd112qChsmm15mc2Vaax9VTYeZZz4zuee/Z XnJ3ylIm2m4jtIFkbT1Pcc8NNPwKC0BBRLEivIoE3WMTAaey/wg2DEGJUbGEUR87d13u dtNA== X-Gm-Message-State: AOJu0YwRXWj6xqPJy1VWm1Jb52NCHWheIma+Ugwph+nw1asEwEeYFj8A cVCQefxaaUdhM0KUWyFqtyd5yR0uHIUBCC1Hhocjuegqx6IMktD+AW/TtviT4eU0wyq5DTz7W1D +6U70JlKSESTs9eAGKzTFXt/ZbrtDWL4PKmiM5VyWPetVdyk= X-Google-Smtp-Source: AGHT+IEwq8e6h4479YFqApOWFnJGF6z4ccnZwpb3RlirbzLPZC6GY57mawDLakb8CnhfyuvTLDvyVeIEau/IfUaeL0c= X-Received: by 2002:a05:6402:280d:b0:58e:2f7c:a9c with SMTP id 4fb4d7f45d1cf-5bbb2458317mr1698749a12.26.1723117471316; Thu, 08 Aug 2024 04:44:31 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Francisco Olarte Date: Thu, 8 Aug 2024 13:43:54 +0200 Message-ID: Subject: Re: Vacuum full connection exhaustion To: Costa Alexoglou Cc: pgsql-general@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, 8 Aug 2024 at 11:18, Costa Alexoglou wrote: ... > So I am running Benchbase (a benchmark framework) with 50 terminals (50 c= oncurrent connections). > There are 2-3 additional connections, one for a postgres-exporter contain= er for example. ... > So far so good, and with a `max_connections` at 100 there is no problem. = What happens is that if I execute manually `VACUUM FULL` the connections ar= e exhausted. > Also tried this with 150 `max_connections` to see if it just =E2=80=9Cdou= bles=E2=80=9D the current connections, but as it turned out, it still exhau= sted all the connections until it reached `max_connections`. > This was cross-checked, as the postgres-exporter could not connect, and I= manually was not allowed to connect with `psql`. Have you tried to check where the connections are coming from and what are they doing? Apart from the max-paralell-worker stuff already commented by Ron in an scenario with a long live locking processes ( vacuum full ) combined with potentially aggresive connecting ( a benchmark tool ) I would verify the benchmark tool is not timing out and disconnecting improperly leaving connections hung up. Francisco Olarte.