Re: [GENERAL] Service outage: each postgres process use the exactamount of the configured work_mem - Mailing list pgsql-general

From Igor Neyman
Subject Re: [GENERAL] Service outage: each postgres process use the exactamount of the configured work_mem
Date
Msg-id DM5PR07MB281034984AF523DC4E0095C6DA050@DM5PR07MB2810.namprd07.prod.outlook.com
Whole thread Raw
In response to Re: [GENERAL] Service outage: each postgres process use the exactamount of the configured work_mem  (Moreno Andreo <moreno.andreo@evolu-s.it>)
Responses Re: [GENERAL] Service outage: each postgres process use the exactamount of the configured work_mem [(AUTO-RE)SOLVED...]  (Moreno Andreo <moreno.andreo@evolu-s.it>)
List pgsql-general

 

From: Moreno Andreo [mailto:moreno.andreo@evolu-s.it]
Sent: Friday, April 14, 2017 3:11 PM
To: Igor Neyman <ineyman@perceptron.com>; Melvin Davidson <melvin6925@gmail.com>
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Service outage: each postgres process use the exact amount of the configured work_mem

 

Attention: This email was sent from someone outside of Perceptron. Always exercise caution when opening attachments or clicking links from unknown senders or when receiving unexpected emails.

 

Il 14/04/2017 21:06, Igor Neyman ha scritto:

 

From: Moreno Andreo [mailto:moreno.andreo@evolu-s.it]
Sent: Friday, April 14, 2017 3:00 PM
To: Igor Neyman <ineyman@perceptron.com>; Melvin Davidson <melvin6925@gmail.com>
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Service outage: each postgres process use the exact amount of the configured work_mem

 

Attention: This email was sent from someone outside of Perceptron. Always exercise caution when opening attachments or clicking links from unknown senders or when receiving unexpected emails.

 

Il 14/04/2017 20:40, Igor Neyman ha scritto:

 

E. How many users were connected when the problem occurred?

About 350 connections

Thanks

______________________________________________________________________________________

 

Probably that is your problem, if you don’t have connection pooler.

I’d recommend to start with PgBouncer, very light-weight and easy to configure.

 

Regards,

Igor Neyman

 

I'm building such a system, but I don't think that's the problem because now, with 30 active connections, it still does not work (actually it's extremely slow).

Both servers are far from being under heavy load (so they were before...)

Having total of 350 connections and only 30 of them being active, is the exact case where connection pooler helps.

Igor Neyman

 

Sorry, I misexplained.
4 hours ago we were in rush hour and the server was running with its usual load (graphs do not show spikes in server load), and we had about 350 connections.
To troubleshoot the whole thing, I needed to restart the servers, in the meantime customers disconnected.
Now I have 30 of them (most of them alive), select * from pg_stat_activity shows 30 connections.
That's why I don't think it's a connection # problem.
____________________________________________________________________________________________________________________

 

Right.

But you had 300 connections when the problem occurred, and leads me to believe that pgBouncer is needed.

 

Igor Neyman

 

 

pgsql-general by date:

Previous
From: Moreno Andreo
Date:
Subject: Re: [GENERAL] Service outage: each postgres process use the exactamount of the configured work_mem
Next
From: Osahon Oduware
Date:
Subject: Re: [GENERAL] Error During PostGIS Build From Source on Linux