Re: Increase in max_connections

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Re: Increase in max_connections
Дата
Msg-id CAMkU=1xmg3DdOrp2jypJNo1_wVoamux-jCzTH0f0DQEL5rjB1A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Increase in max_connections  ("Anand Kumar, Karthik" <Karthik.AnandKumar@classmates.com>)
Список pgsql-general
On Tue, Mar 11, 2014 at 10:20 AM, Anand Kumar, Karthik <Karthik.AnandKumar@classmates.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

В списке pgsql-general по дате отправления:

Предыдущее
От: Marti Raudsepp
Дата:
Сообщение: Re: automatically refresh all materialized views?
Следующее
От: John R Pierce
Дата:
Сообщение: Re: Increase in max_connections