Re: PostgreSQL(v9.6.5) not releasing old/inactive IDLE connections
От | Paul Smith |
---|---|
Тема | Re: PostgreSQL(v9.6.5) not releasing old/inactive IDLE connections |
Дата | |
Msg-id | c0ed0cc7-1212-c34c-65ab-139936bdf785@pscs.co.uk обсуждение исходный текст |
Ответ на | PostgreSQL(v9.6.5) not releasing old/inactive IDLE connections (Md Arqum Farooqui <Md.Farooqui@india.nec.com>) |
Ответы |
Re: PostgreSQL(v9.6.5) not releasing old/inactive IDLE connections
|
Список | pgsql-admin |
@font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0cm; margin-bottom:.0001pt; font-size:11.0pt; font-family:"Calibri",sans-serif; mso-fareast-language:EN-US;}a:link, span.MsoHyperlink {mso-style-priority:99; color:#0563C1; text-decoration:underline;}a:visited, span.MsoHyperlinkFollowed {mso-style-priority:99; color:#954F72; text-decoration:underline;}span.EmailStyle17 {mso-style-type:personal-compose; font-family:"Calibri",sans-serif; color:windowtext;}.MsoChpDefault {mso-style-type:export-only; font-family:"Calibri",sans-serif; mso-fareast-language:EN-US;}div.WordSection1 {page:WordSection1;} 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 ), 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@pscs.co.uk - 01484 855800
В списке pgsql-admin по дате отправления: