Persistent Connections - Mailing list pgsql-general

From Bee.Lists
Subject Persistent Connections
Date
Msg-id E19EF208-2A79-41A2-9760-577A85B815CD@gmail.com
Whole thread Raw
Responses Re: Persistent Connections  (Michael Lewis <mlewis@entrata.com>)
Re: Persistent Connections  (Tim Cross <theophilusx@gmail.com>)
Re: Persistent Connections  ("Peter J. Holzer" <hjp-pgsql@hjp.at>)
List pgsql-general
I have an issue with a server (v10) that’s seeing increasing connections until it’s maxxed-out.

max_connections for my 4-core server is set to 12.

I’ve 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’ve been getting errors from my workstation through a
Rubygem that says dropped connections happen.  Essentially, the server isn’t giving up connections and clients from all
sidesare showing some issues. 

pg_stat_activity has shown a handful of idle queries that are quite simple.  I’ve tested those queries and they seem
fineon a workstation client.  I’m assuming these queries somehow don’t finish and leave the connection open, but I
couldbe wrong.  All of this is new to me.   

It was suggested on Slack that it sounds like my workstation had some TCP issues with these connections, and that it
wasa firewall.  I disabled the firewall and the same happened.  The firewall has been restarted.   

I am running no connection pool tool of any sort, and I’ve never used one.

At this point I don’t know what to even be watching for.  Connections increase and connections “drop”, according to the
gemI’m using.  I have simple queries that are idle and won’t disappear for some reason.   

How can I figure this out so the connections remain within the max_connections limit, and connections are not dropped?


Any insight appreciated.


Cheers, Bee







pgsql-general by date:

Previous
From: Edu Gargiulo
Date:
Subject: Re: pg_dump empty tables
Next
From: "Jim Hurne"
Date:
Subject: RE: autovacuum failing on pg_largeobject and disk usage of thepg_largeobject growing unchecked