Re: Getting error "too many clients already" despite having a db connection limit set

2025-06-16 Thread David G. Johnston
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 d

Re: Getting error "too many clients already" despite having a db connection limit set

2025-06-16 Thread Adrian Klaver
On 6/16/25 11:09 AM, David G. Johnston wrote: 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 refer

Re: Getting error "too many clients already" despite having a db connection limit set

2025-06-16 Thread Marco Torres
You might want to explore pgpool and pgbouncer. Depending in your use case you might want to glue them togeter. On Mon, Jun 16, 2025, 10:39 AM Tom Lane wrote: > adolfo flores writes: > > I hope you can help me with an issue we're experiencing. We have an app > > running on Kubernetes that opens

Re: Getting error "too many clients already" despite having a db connection limit set

2025-06-16 Thread Adrian Klaver
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 o

Re: Getting error "too many clients already" despite having a db connection limit set

2025-06-16 Thread Richard Welty
a coding error i've seen from inexperienced devs with little database experience is inattentiveness to how the DB connections were being opened. last time i saw this, a smart young dev with no DB background did not understand the cost of opening connections and had on the order of 30 php calls t

Re: Getting error "too many clients already" despite having a db connection limit set

2025-06-16 Thread Tom Lane
adolfo flores writes: > 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. You need to fix that app to be less unfriendly, or maybe put it behind a connection pooler. > Is it expect

Getting error "too many clients already" despite having a db connection limit set

2025-06-16 Thread adolfo flores
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

Re: pg_restore ERROR: permission denied to change default privileges

2025-06-16 Thread Rachel Roch
15 Jun 2025, 17:15 by adrian.kla...@aklaver.com: > > It is redundant for fgrep. > Talk about muscle memory !  How many years have I still been typing fgrep -F thinking I was typing grep -F !