From: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com> |
---|---|
To: | "Anand Kumar, Karthik" <Karthik(dot)AnandKumar(at)classmates(dot)com> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Increase in max_connections |
Date: | 2014-03-11 19:47:12 |
Message-ID: | CAMkU=1xmg3DdOrp2jypJNo1_wVoamux-jCzTH0f0DQEL5rjB1A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, Mar 11, 2014 at 10:20 AM, Anand Kumar, Karthik <
Karthik(dot)AnandKumar(at)classmates(dot)com> wrote:
> Thanks Jeff. We have scripts in place now to capture the incoming rate
> of requests. Waiting on the crash to happen to see if it spikes up :)
>
> Re: min_log_duration - we *do* see a good number of requests in the log
> that hit our cap (of 100ms). Just that nothing stands out when we have the
> issue. Whatever queries we do see slow down seem to be after we start the
> CPU spike, and so an effect and not a cause.
>
I think what you have is a vicious cycle: too many active connections leads
to contention which leads to slow response which leads to piling up
connections which leads to more contention. So the cause and the effect
are the same thing as each other, you can't cleanly divide them.
>
> We typically see about 500-700 active queries at a time - and that seems
> to match how high connection limit goes.
>
This is during normal times, or during the trouble?
> We tried pg_bouncer, however, at session level pooling, it slowed down our
> applications (they maintain persistent connections once established, so any
> connection overhead slows them down),
>
I don't understand that. If the connections are persistent, why would they
increase during the slow down?
Cheers,
Jeff
From | Date | Subject | |
---|---|---|---|
Next Message | John R Pierce | 2014-03-11 20:06:25 | Re: Increase in max_connections |
Previous Message | Marti Raudsepp | 2014-03-11 19:42:41 | Re: automatically refresh all materialized views? |