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 1jnpYH-0005oZ-58 for pgsql-general@arkaria.postgresql.org; Tue, 23 Jun 2020 20:29:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jnpYF-0000dv-UL for pgsql-general@arkaria.postgresql.org; Tue, 23 Jun 2020 20:29:51 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jnpYF-0000do-J9 for pgsql-general@lists.postgresql.org; Tue, 23 Jun 2020 20:29:51 +0000 Received: from mail-qt1-x832.google.com ([2607:f8b0:4864:20::832]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jnpYC-0007RM-OC for pgsql-general@postgresql.org; Tue, 23 Jun 2020 20:29:49 +0000 Received: by mail-qt1-x832.google.com with SMTP id e12so5582130qtr.9 for ; Tue, 23 Jun 2020 13:29:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:content-transfer-encoding:subject:message-id:date:to :mime-version; bh=EVhfe49XBekOAnz96sObB3mCqZOXsMvRLJIX5yoeKwI=; b=HTlkY5BdT8uvODoDeqG68SpabgIsNW/k0Snj29vAJP3D/bv98GH9DUJPsm6TFMDBn3 +18WkgwryqBrnb5VFQ2ATXsn8O3fNX8pBbtlqpDWRnDZFcb89YCExw2GsqLy7MHxt/oB f8v85BGzRDEh6o+xCQan7TXMXBE1/MixeyBa1ymKQOPZX0sWgznSw7Gx7AFFS8upCcIK yHKfOxrm383jQFjIwaytpqy2m1ytHzdKE9VUKyCxZyY8YUMdNLkqbzpUmf4WudbsfCU3 7IkG9A3rWx76c/pnWlJJ7wy2pe+bIaeir+uO5QKvIYvhV3kxulhSGciVcwCNMBTEt0OZ obYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:subject :message-id:date:to:mime-version; bh=EVhfe49XBekOAnz96sObB3mCqZOXsMvRLJIX5yoeKwI=; b=KxwYSgNcq56W+H0AF9bqWrDXHYAsH2r6/aKWH8Td+Ssjb0vuPtLD5A+0U7dRN9bBH+ TFzaQKtiWmZEpIVSTTmQ2C3ocKhgMkAwODddyMSbXnCddO09Cy3OGpRVpc+a7nuaq3oy ghDflf8+QjXZSFYyuFHE64xxXWTQA3YY+1q2WV9qUZ1TdA/lSnS7II+dIvwGA6oldQtC 2JtNKB/cbDgkJhopYegdEznnFRhUokGtER4MMhJ6hm0VdWjzJhL4jcOVGMpkbxWKV/Nr cNQh8T3QYbbX4KOmbJw4Wfl4C/jN8XhOuLy5+hOO7QXAv8UVMCM+puKzNOeIXNB5bC2z RgNg== X-Gm-Message-State: AOAM533uSHlsX11ZLYhvOocYfBHvQDatk1xCFIT98uVuZrbLaMkUMV7U /yc6vekWRubi9YvcgZ0YmYCj2Jkx X-Google-Smtp-Source: ABdhPJxAfcw+Tnd6y+j7XBWlKf2n7u5yM10HQkZJekQNCxE4LuASTIIBDmSgZiKXdTP564qPEizQLg== X-Received: by 2002:aed:3bb9:: with SMTP id r54mr19373008qte.13.1592944187620; Tue, 23 Jun 2020 13:29:47 -0700 (PDT) Received: from [192.168.1.4] (pints.com. [206.248.184.17]) by smtp.gmail.com with ESMTPSA id x26sm1545324qtr.4.2020.06.23.13.29.46 for (version=TLS1 cipher=ECDHE-ECDSA-AES128-SHA bits=128/128); Tue, 23 Jun 2020 13:29:47 -0700 (PDT) From: "Bee.Lists" Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Persistent Connections Message-Id: Date: Tue, 23 Jun 2020 16:29:46 -0400 To: Submit Postgresql General Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) X-Mailer: Apple Mail (2.3124) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I have an issue with a server (v10) that=E2=80=99s seeing increasing = connections until it=E2=80=99s maxxed-out. =20 max_connections for my 4-core server is set to 12. =20 I=E2=80=99ve installed pg_stat_activity and pg_stat_statements. I access this server through a web app, and another client on two = machines. I also send queries through SSH on the LAN. psql queries = indicate there are too many clients already. I=E2=80=99ve been getting = errors from my workstation through a Ruby gem that says dropped = connections happen. Essentially, the server isn=E2=80=99t giving up = connections and clients from all sides are showing some issues. pg_stat_activity has shown a handful of idle queries that are quite = simple. I=E2=80=99ve tested those queries and they seem fine on a = workstation client. I=E2=80=99m assuming these queries somehow don=E2=80=99= t finish and leave the connection open, but I could be wrong. All of = this is new to me. =20 It was suggested on Slack that it sounds like my workstation had some = TCP issues with these connections, and that it was a firewall. I = disabled the firewall and the same happened. The firewall has been = restarted. =20 I am running no connection pool tool of any sort, and I=E2=80=99ve never = used one. =20 At this point I don=E2=80=99t know what to even be watching for. = Connections increase and connections =E2=80=9Cdrop=E2=80=9D, according = to the gem I=E2=80=99m using. I have simple queries that are idle and = won=E2=80=99t disappear for some reason. =20 How can I figure this out so the connections remain within the = max_connections limit, and connections are not dropped? =20 Any insight appreciated. =20 Cheers, Bee