pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Chris Withers <chris@withers.org>
To: pgsql-general@lists.postgresql.org
Subject: sensible configuration of max_connections
Date: Fri, 7 Feb 2020 08:35:45 +0000
Message-ID: <e1c73911-cfee-8b5d-d847-2487729f35f5@withers.org> (raw)

Hi All,

What's a sensible way to pick the number to use for max_connections?

I'm looking after a reasonable size multi-tenant cluster, where the 
master handles all the load and there's a slave in case of hardware 
failure in the master.
The machine is used to host what I suspect are mainly django 
applications, so lots of short web requests, not sure how much, if any, 
django's orm does connection pooling.

I arbitrarily picked 1000 for max_connections and haven't had any 
problems, but onboarding another app that handles a few million requests 
per day  on Monday and thinking about potential problems related to the 
number of available connections.

What's "too much" for max_connections? What happens when you set it to 
high? What factors affect that number?

cheers,

Chris





view thread (9+ messages)  latest in thread

Message-ID: <e1c73911-cfee-8b5d-d847-2487729f35f5@withers.org>
Permalink:  ../e1c73911-cfee-8b5d-d847-2487729f35f5@withers.org/
Also on:    postgresql.org/message-id/e1c73911-cfee-8b5d-d847-2487729f35f5@withers.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: chris@withers.org
  Subject: Re: sensible configuration of max_connections
  In-Reply-To: <e1c73911-cfee-8b5d-d847-2487729f35f5@withers.org>
  References: <e1c73911-cfee-8b5d-d847-2487729f35f5@withers.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox