Re: Handling idle connections

From: Scott Ribe <scott_ribe(at)elevated-dev(dot)com>
To: Rajesh Kumar <rajeshkumar(dot)dba09(at)gmail(dot)com>
Cc: Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: Handling idle connections
Date: 2023-09-24 13:19:44
Message-ID: FE25C43F-16C6-43B2-A2C6-C80347C9E6F3@elevated-dev.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

> On Sep 24, 2023, at 7:03 AM, Rajesh Kumar <rajeshkumar(dot)dba09(at)gmail(dot)com> wrote:
>
> Could u give me a tip on how to figure out where they are coming and what do u mean exactly by saying "fixing" them

Look at pg_stat_activity. There's the application_name column--if your apps are not setting that, the query column shows last/current query and that is sometimes a clue. (Also, if your clients are not setting application name, fix them.)

If you don't want client applications leaving connections idle, then clients should release connections when not using them.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Erik Wienhold 2023-09-24 13:29:34 Re: Handling idle connections
Previous Message Rajesh Kumar 2023-09-24 13:03:31 Re: Handling idle connections