Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oPbVV-0002Ow-W4 for pgsql-performance@arkaria.postgresql.org; Sun, 21 Aug 2022 03:20:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oPbVT-0001g3-Aa for pgsql-performance@arkaria.postgresql.org; Sun, 21 Aug 2022 03:20:11 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oPbVT-0001fu-0y for pgsql-performance@lists.postgresql.org; Sun, 21 Aug 2022 03:20:11 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oPbVO-0007G4-Bh for pgsql-performance@lists.postgresql.org; Sun, 21 Aug 2022 03:20:07 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 27L3K2ZV3909996; Sat, 20 Aug 2022 23:20:03 -0400 From: Tom Lane To: Kevin McKibbin cc: pgsql-performance@lists.postgresql.org Subject: Re: pgbench: could not connect to server: Resource temporarily unavailable In-reply-to: References: Comments: In-reply-to Kevin McKibbin message dated "Sat, 20 Aug 2022 20:08:47 -0600" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3909994.1661052002.1@sss.pgh.pa.us> Date: Sat, 20 Aug 2022 23:20:02 -0400 Message-ID: <3909995.1661052002@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Kevin McKibbin writes: > What's limiting my DB from allowing more connections? > This is a sample of the output I'm getting, which repeats the error 52 > times (one for each failed connection) > -bash-4.2$ pgbench -c 200 -j 200 -t 100 benchy > ... > connection to database "benchy" failed: > could not connect to server: Resource temporarily unavailable > Is the server running locally and accepting > connections on Unix domain socket > "/var/run/postgresql/.s.PGSQL.5432"? This is apparently a client-side failure not a server-side failure (you could confirm that by seeing whether any corresponding failure shows up in the postmaster log). That means that the kernel wouldn't honor pgbench's attempt to open a connection, which implies you haven't provisioned enough networking resources to support the number of connections you want. Since you haven't mentioned what platform this is on, it's impossible to say more than that --- but it doesn't look like Postgres configuration settings are at issue at all. regards, tom lane