From: | Paul Smith <paul(at)pscs(dot)co(dot)uk> |
---|---|
To: | pgsql-admin(at)lists(dot)postgresql(dot)org |
Subject: | Re: PostgreSQL(v9.6.5) not releasing old/inactive IDLE connections |
Date: | 2021-12-08 09:18:22 |
Message-ID: | c0ed0cc7-1212-c34c-65ab-139936bdf785@pscs.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
On 08/12/2021 06:45, Md Arqum Farooqui wrote:
>
> Hi,
>
> I'm facing "Too many clients already" error frequently with my
> PostgreSQL (v9.6.5) container (i.e. being used along with CKAN
> application i.e. A open source data management system
> <https://ckan.org/> ), I have observed that PostgreSQL is not
> releasing IDLE connections from their end. I have set "max_connetions
> = 100" in postgresql.
>
It is the responsibility of the client software to release connections
when they are no longer needed. The server won't just time-out idle
connections unless it is told to do so
I guess CKAN is keeping a pool of available connections that it can
reuse without having to start a new connection. You may be able to set
parameters in CKAN so that it kills connections after they have been
idle a while. If you're not sure, you really need to ask on a CKAN
support forum
Or you could use a separate connection pooler (eg PgBouncer) and have
CKAN connect to that instead of the database directly. The pooler will
then manage reuse across all the client applications, and may be able to
timeout idle connections for you.
--
Paul
Paul Smith Computer Services
support(at)pscs(dot)co(dot)uk - 01484 855800
--
Paul Smith Computer Services
Tel: 01484 855800
Vat No: GB 685 6987 53
Sign up for news & updates at http://www.pscs.co.uk/go/subscribe
From | Date | Subject | |
---|---|---|---|
Next Message | Dischner, Anton | 2021-12-08 11:13:54 | AW: postgresql long running query |
Previous Message | liam saffioti | 2021-12-08 08:34:42 | Re: postgresql long running query |