Re: Idle connections / sessions

From: Thomas Poty <thomas(dot)poty(at)gmail(dot)com>
To: Oygun Josef <josef(dot)oygun(at)scania(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Idle connections / sessions
Date: 2018-12-12 18:26:11
Message-ID: CAN_ctnhpRDJmQaBVZM6008RkLYdCwtYx17ytx3yDeVkJoJ7o2w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support pgsql-general pgsql-jdbc pgsql-sql

Sorry but i don't know (i am not familiar with aws) ....
Maybe this will help: If you want pg_terminator can run on postgresql
server.

Regards
Thomas

Le mer. 12 déc. 2018 à 12:20, Oygun Josef <josef(dot)oygun(at)scania(dot)com> a écrit :

> Hi,
>
>
>
> Sorry for that!
>
>
>
> Thank you for the answers, this is good but do you know if there is a way
> do to it through AWS console with some kind of configuration instead?
>
>
>
> Reason for that is the we use terraform scripts to create and keep state
> of our instances so pg_terminator would require me to add every new db
> props to it.
>
>
>
> /Josef
>
>
>
>
>
> *Från:* Thomas Poty [mailto:thomas(dot)poty(at)gmail(dot)com]
> *Skickat:* den 12 december 2018 11:11
> *Till:* pgsql-general(at)lists(dot)postgresql(dot)org
> *Ämne:* Re: Idle connections / sessions
>
>
>
> Hi Josef,
>
>
>
> pg_terminator may help you.
>
>
>
> thomas
>
>
>
> Le mer. 12 déc. 2018 à 11:02, Fabio Pardi <f(dot)pardi(at)portavita(dot)eu> a écrit :
>
> Hi Josef,
>
> please avoid cross posting to multiple lists.
>
> I m not a developer, but I think that if you do not want idle connections,
> you should terminate them on the side they have been created.
>
> If your application leaves the connection open, then you will notice idle
> connections on Postgres when not in use.
>
> regards,
>
> fabio pardi
>
> On 12/12/2018 10:37, Oygun Josef wrote:
>
> Hi,
>
>
>
> Is it possible to terminate idle connections/sessions automatically
> through a timeout in AWS or do I need to run a periodical cron job for this?
>
>
>
> Postgres version: 9.6.6
>
> Instance: db.t2.micro
>
> RAM : 1GB
>
>
>
> We are running a microservice architecture using docker with kubernetes
> and I can see that every pod on every node that has connected to the DB
> still has a idle connection as long as the node is still active even.
>
>
>
> It is both PGAdmin and the PostgreSQL JDBC Driver that leaves open idle
> connections.
>
>
>
>
>
> *Josef Oygun*
>
>
>
>
>
>

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Ravi Krishna 2018-12-12 22:37:47 explain analyze cost
Previous Message Oygun Josef 2018-12-12 11:20:24 SV: Idle connections / sessions

Browse pgsql-general by date

  From Date Subject
Next Message Abraham, Danny 2018-12-12 18:33:13 psql output in Japanese Code Page
Previous Message Andrew Gierth 2018-12-12 16:36:10 Re: Code for getting particular day of week number from month

Browse pgsql-jdbc by date

  From Date Subject
Next Message Ravi Krishna 2018-12-12 22:37:47 explain analyze cost
Previous Message Oygun Josef 2018-12-12 11:20:24 SV: Idle connections / sessions

Browse pgsql-sql by date

  From Date Subject
Next Message Ravi Krishna 2018-12-12 22:37:47 explain analyze cost
Previous Message Oygun Josef 2018-12-12 11:20:24 SV: Idle connections / sessions