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 1uREHi-008psm-8r for pgsql-general@arkaria.postgresql.org; Mon, 16 Jun 2025 18:10:18 +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 1uREHe-002GI0-Ti for pgsql-general@arkaria.postgresql.org; Mon, 16 Jun 2025 18:10:15 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uREHe-002GHs-In for pgsql-general@lists.postgresql.org; Mon, 16 Jun 2025 18:10:15 +0000 Received: from mail-oo1-xc35.google.com ([2607:f8b0:4864:20::c35]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uREHc-002PHc-2q for pgsql-general@lists.postgresql.org; Mon, 16 Jun 2025 18:10:14 +0000 Received: by mail-oo1-xc35.google.com with SMTP id 006d021491bc7-606440d92eeso2285038eaf.2 for ; Mon, 16 Jun 2025 11:10:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1750097411; x=1750702211; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Sn0oYBaPqJhN+eUIyXe5KJbK24/Nt26GVqpTAtZyERU=; b=Un64EIePni1gjwWoglDFJIcdAO4AFgYitUQI31BFGXERFCIv8KnG738T9nkdvXBPJV ioYLVMyXuayzN6LLV+h4589+11ec5LGYIbOqQjmfz6OmOXa3tSNpuh+BN4PqYs95mR7I 9/fIZbB5HjXcm0NMaowlPl9or2KPw1R5BBocJPhn5qn1I/zOHCRQx2YTxgLbf4s372Wx CiJN9GD2wBUvuPzXPL//eOyb1VDWn4Xyjga0B8TnpXZgzGS1wm6qAXY0ahcSE8YPSlUH zki0DfbOlc3iSp/FC14KSwnkDTiTSn1t/L7wFHGSTy13O9/Hovz0qByUIDbCyxCicyjT Odug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750097411; x=1750702211; h=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=Sn0oYBaPqJhN+eUIyXe5KJbK24/Nt26GVqpTAtZyERU=; b=mH2cbo5bMx1yDHNQIpWqx2CQg3vlKKSRzhYtrstXU++tt0fNfURq6eKTanbTb3Qq+G K+tvJyZgy6WROs6lv/YQdl7yuQXa9uDIaPHaar10/lz/9jCzcbms+94/MhZhtl7FLFp6 F9aqBlQ8iUO6E8dhLzl8jHvYENGi7iWx7GWnGNRI7rtMxTopEfIqP2byJu0tUs2FBOaq +lEA8xBNxlN9oF664h14rzMzog/qN4Bh+M/m+lEBJovZscWnQwLQAokxE2lw9ElvuZfg cTos60YpHU4BfhQ7W1znlz/pCwi1PRsYu9QWTyRorLxLJljFYVs+xie6BjGbbWRFEfyQ tLVw== X-Forwarded-Encrypted: i=1; AJvYcCU6zaDY5ZId8PjSOZBDK35tPU0UscA+i/gjwpP9bOV8F/xeSM+Yx0G1XOIOekNE8a4Ehs6hUGAUmDA37dTW@lists.postgresql.org X-Gm-Message-State: AOJu0YxeIrTWXNfr+3htcgYZ2rCUH8+peDyY26DAhW0sgSKhtxqPqbyq 9Rho9qu2Q0GdQgFv2Nx00Wr4MY/71PM3+rEZyUBO0SgqRl2zUSYdRAUN4HscLEL08wq3Br7uOdk wccTi6yrIeZ8pYEpne6oYZ12Qfk4wQxo= X-Gm-Gg: ASbGncsgPxl4/N2j//Qr26Wa8LJv6mNlQo0ruLc1coDwB5DDrApoP2Pm5zbYIdmSoqZ fBJgFaOtk0hVh19WFyuAXFnLldHHsC/iDv32F1W5+Ga1BW5OZZRTF16BgTktF3hajljmaW8Ttli koe9Woz7ZoKh++f4fEboIuxwALUSbyeG1OekaQ9PLzsXmf4KDQoxIZuKbdaND8Ko5dUMAfzf/Jz zmz X-Google-Smtp-Source: AGHT+IFFX3rqQPYasObXETT2gPpmNInS3AEtSNTZd8P5UUqco5NPK3NVT0LP7XzA0c1VxfHFrfm+9cjAqlsuB6+pd5Y= X-Received: by 2002:a05:6820:1c9b:b0:606:26bd:7208 with SMTP id 006d021491bc7-6111100224fmr6543459eaf.7.1750097410659; Mon, 16 Jun 2025 11:10:10 -0700 (PDT) MIME-Version: 1.0 References: <484c43a4-962d-44ed-af87-e5abde63bd04@aklaver.com> In-Reply-To: <484c43a4-962d-44ed-af87-e5abde63bd04@aklaver.com> From: "David G. Johnston" Date: Mon, 16 Jun 2025 11:09:59 -0700 X-Gm-Features: AX0GCFsnDvBTUjX81uUZQFeGa304UESu2ZIw2hLelwqfDQTTe7PFsJgpUIWQK-A Message-ID: Subject: Re: Getting error "too many clients already" despite having a db connection limit set To: Adrian Klaver Cc: adolfo flores , pgsql-general@lists.postgresql.org Content-Type: multipart/alternative; boundary="0000000000007c1b690637b44e5a" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000007c1b690637b44e5a Content-Type: text/plain; charset="UTF-8" On Mon, Jun 16, 2025, 10:21 Adrian Klaver wrote: > On 6/16/25 09:29, adolfo flores wrote: > > Hello Team, > > > > I hope you can help me with an issue we're experiencing. We have an app > > running on Kubernetes that opens a huge number of connections within a > > couple of seconds. > > > > The database that the app connects to, is configured with a connection > > limit of 30% of the max_connections setting. Despite this limit being > > I am not understanding the above. The connection limit from the database > side is going to be the value for max_connections. It is not clear to me > what "... connection limit of 30% of the max_connections setting" is > referring to? > See "alter database ... set" David J. --0000000000007c1b690637b44e5a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Mon, Jun 16, 2025, 10:21 Adri= an Klaver <adrian.klaver@ak= laver.com> wrote:
On 6/16/= 25 09:29, adolfo flores wrote:
> Hello Team,
>
> I hope you can help me with an issue we're experiencing. We have a= n app
> running on Kubernetes that opens a huge number of connections within a=
> couple of seconds.
>
> The database that the app connects to, is configured with a connection=
> limit of 30% of the max_connections setting. Despite this limit being =

I am not understanding the above. The connection limit from the database side is going to be the value for max_connections. It is not clear to me what "...=C2=A0 connection limit of 30% of the max_connections setting= " is
referring to?

See "alter database ... set"
=
David J.


--0000000000007c1b690637b44e5a--