Re: max_connections reached in postgres 9.3.3 - Mailing list pgsql-general

From Merlin Moncure
Subject Re: max_connections reached in postgres 9.3.3
Date
Msg-id CAHyXU0zFR56+HuPZYq3MtCczgDxyR9+Sm-CY3usn=ZV1RWqg9A@mail.gmail.com
Whole thread Raw
In response to Re: max_connections reached in postgres 9.3.3  (Borislav Ivanov <bivanov@atlassian.com>)
Responses Re: max_connections reached in postgres 9.3.3
Re: max_connections reached in postgres 9.3.3
List pgsql-general
On Thu, Jun 19, 2014 at 5:12 PM, Borislav Ivanov <bivanov@atlassian.com> wrote:
> However, most people on our team think that the number of connections is
> purely a symptom of the actual problem. We would love to be wrong about
> this. But for now we feel the high number of connections contributes for
> preserving the problem but it's not actually triggering the problem.

This is entirely correct.  pgbouncer does not preventing database load
but about limiting damage when it occurs.  This generally necessary in
environments where application servers keep piling on connections when
the database is not clearing queries fast enough.

In your case user% is dominating system load.  Along with the high cs
this is really suggesting spinlock contention.  A 'perf top' is
essential for identifying the culprit.  It's very possible that 9.4
will fix your problem...see:
http://postgresql.1045698.n5.nabble.com/Cpu-usage-100-on-slave-s-lock-problem-td5768655.html.
There was some poorly optimized code in the wal replay.

merlin


pgsql-general by date:

Previous
From: Borislav Ivanov
Date:
Subject: Re: Best backup strategy for production systems
Next
From: "Vasudevan, Ramya"
Date:
Subject: Re: max_connections reached in postgres 9.3.3