Search Postgresql Archives

Re: Increase in max_connections

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 10, 2014 at 6:04 PM, Anand Kumar, Karthik <Karthik.AnandKumar@xxxxxxxxxxxxxx> wrote:
Hi all,

We're running postgres 9.3.2, server configuration below. 

Seemingly randomly, we will see the number of active queries in postgres go up until we hit max_connections. The DB will recover after a few minutes.

We had the issue a couple of times in Feb 2014. We then upgraded the postgres server from 9.1 to 9.3.2, and the occurrence has gone up significantly – to several times a day. 

The user CPU goes up as well to a 100%, no increase in I/O or system CPU.
We have slow query logging, and there is no dramatic change in the slow queries either. 


I think you might need to change your cutoff for what makes a slow query.  It must be the case that either your are seeing an abnormal spike in query requests, or that the queries are taking an abnormally long time (or both).  If not many queries are hitting log_min_duration_statement, that just means you can lower it further without causing too much log bloat.

Usually when people hit max_connections under load, it means they need to move the limit into a connection pooler (where it can be more graceful, by putting them in a queue for a free slot, rather than returning an error) and *lower* max_connections.


max_connections|1500|configuration file

 That is very high.

Cheers,

Jeff

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux