pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #14453: Growing file descriptors on IDLE connections
2+ messages / 2 participants
[nested] [flat]

* BUG #14453: Growing file descriptors on IDLE connections
@ 2016-12-07 11:06 akshay.ballarpure@tcs.com
  2016-12-07 14:15 ` Re: BUG #14453: Growing file descriptors on IDLE connections Stephen Frost <sfrost@snowman.net>
  0 siblings, 1 reply; 2+ messages in thread

From: akshay.ballarpure@tcs.com @ 2016-12-07 11:06 UTC (permalink / raw)
  To: pgsql-bugs

The following bug has been logged on the website:

Bug reference:      14453
Logged by:          Akshay B
Email address:      akshay.ballarpure@tcs.com
PostgreSQL version: Unsupported/Unknown
Operating system:   RHEL
Description:        

Hi,
Is there any way to clean up idle connections which are consuming a large
number of file descriptors ? Does it have any impact on psql server
performance ?

[root@ms-esmon cloud-user]# ps -eaf | grep postgres
postgres  2809     1  0 Dec06 ?        00:00:04 /usr/bin/postmaster -p 5432
-D /var/ericsson/esm-data/postgresql-data
postgres  2811  2809  0 Dec06 ?        00:00:09 postgres: logger process    
                                        
postgres  2813  2809  0 Dec06 ?        00:01:10 postgres: writer process    
                                        
postgres  2814  2809  0 Dec06 ?        00:00:48 postgres: wal writer process
                                        
postgres  2815  2809  0 Dec06 ?        00:00:15 postgres: autovacuum
launcher process                                
postgres  2816  2809  0 Dec06 ?        00:00:17 postgres: stats collector
process                                    
postgres 16934  2809  0 10:35 ?        00:00:02 postgres: rhqadmin rhq
127.0.0.1(55676) idle                         
postgres 17315  2809  0 10:37 ?        00:00:00 postgres: rhqadmin rhq
127.0.0.1(55709) idle                         
postgres 17318  2809  0 10:37 ?        00:00:00 postgres: rhqadmin rhq
127.0.0.1(55710) idle                         
postgres 17338  2809  0 10:37 ?        00:00:00 postgres: rhqadmin rhq
127.0.0.1(55716) idle                         
postgres 17339  2809  0 10:37 ?        00:00:00 postgres: rhqadmin rhq
127.0.0.1(55717) idle                         
postgres 17340  2809  0 10:37 ?        00:00:00 postgres: rhqadmin rhq
127.0.0.1(55718) idle                         
postgres 17341  2809  0 10:37 ?        00:00:00 postgres: rhqadmin rhq
127.0.0.1(55719) idle                         
postgres 17527  2809  0 10:37 ?        00:00:00 postgres: rhqadmin rhq
127.0.0.1(55720) idle                         
postgres 17528  2809  0 10:37 ?        00:00:00 postgres: rhqadmin rhq
127.0.0.1(55721) idle                         
postgres 17530  2809  0 10:37 ?        00:00:00 postgres: rhqadmin rhq
127.0.0.1(55722) idle                         
postgres 17534  2809  0 10:37 ?        00:00:00 postgres: rhqadmin rhq
127.0.0.1(55723) idle                         
postgres 18095  2809  0 10:44 ?        00:00:00 postgres: rhqadmin rhq
127.0.0.1(55779) idle                         
postgres 18426  2809  0 10:47 ?        00:00:00 postgres: rhqadmin rhq
[local] idle                                  
postgres 19452  2809  0 10:52 ?        00:00:00 postgres: rhqadmin rhq
[local] idle    

[root@ms-esmon cloud-user]# lsof -p 2813 | wc -l
51
[root@ms-esmon cloud-user]# lsof -p 2814 | wc -l
44
[root@ms-esmon cloud-user]# lsof -p 2815 | wc -l
43
[root@ms-esmon cloud-user]# lsof -p 2816 | wc -l
42
[root@ms-esmon cloud-user]# lsof -p 2809 | wc -l
47
[root@ms-esmon cloud-user]# lsof -p 2811 | wc -l
43

below are the counts on idle connections PID
[root@ms-esmon cloud-user]# lsof -p 16934 | wc -l
220
[root@ms-esmon cloud-user]# lsof -p 17315 | wc -l
80
[root@ms-esmon cloud-user]# lsof -p 17318 | wc -l
79
[root@ms-esmon cloud-user]# lsof -p 17338 | wc -l
140
[root@ms-esmon cloud-user]# lsof -p 17339 | wc -l
150
[root@ms-esmon cloud-user]# lsof -p 17340 | wc -l
148



-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #14453: Growing file descriptors on IDLE connections
  2016-12-07 11:06 BUG #14453: Growing file descriptors on IDLE connections akshay.ballarpure@tcs.com
@ 2016-12-07 14:15 ` Stephen Frost <sfrost@snowman.net>
  0 siblings, 0 replies; 2+ messages in thread

From: Stephen Frost @ 2016-12-07 14:15 UTC (permalink / raw)
  To: akshay.ballarpure@tcs.com; +Cc: pgsql-bugs

Greetings,

* akshay.ballarpure@tcs.com (akshay.ballarpure@tcs.com) wrote:
> The following bug has been logged on the website:

THis is not a bug.

> Is there any way to clean up idle connections which are consuming a large
> number of file descriptors ? Does it have any impact on psql server
> performance ?

Having lots of idle connections around can impact performance in some
instances.  PostrgeSQL intentionally caches the file descriptors of open
files to avoid the overhead of opening them again but that generally
isn't a performance issue.

I would suggest you look into a connection pooler (eg: pgbouncer) to
avoid having lots of idle connections to the database.

Thanks!

Stephen

Attachments:

  signature.asc (application/pgp-signature, 818B) download

^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2016-12-07 14:15 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-12-07 11:06 BUG #14453: Growing file descriptors on IDLE connections akshay.ballarpure@tcs.com
2016-12-07 14:15 ` Stephen Frost <sfrost@snowman.net>

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