Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 285F4181603B for ; Thu, 22 Dec 2011 12:33:07 -0400 (AST) Received: from [64.207.29.137] (helo=mail.illumen.com) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RdlZp-0007Ev-Aw for pgsql-admin@postgresql.org; Thu, 22 Dec 2011 16:33:08 +0000 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01CCC0C7.592F3C41" Subject: Problem with pgstat timneouts Date: Thu, 22 Dec 2011 09:32:51 -0700 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Problem with pgstat timneouts Thread-Index: AczAx1kuxiLh9YPlTemUrggJRq7Iww== From: "Benjamin Krajmalnik" To: "pgsql-admin" X-Host-Lookup-Failed: Reverse DNS lookup failed for 64.207.29.137 (failed) X-Pg-Spam-Score: 0.8 (/) X-Archive-Number: 201112/129 X-Sequence-Number: 38887 This is a multi-part message in MIME format. ------_=_NextPart_001_01CCC0C7.592F3C41 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable About a month ago, I started receiving quite a few pgstat timeouts on my production database. PostgreSQL 9.0.3 on amd64-portbld-freebsd8.1, compiled by GCC cc (GCC) 4.2.1 20070719 [FreeBSD], 64-bit I am not sure where to start looking for the cause. Database has been up since march without any restart =20 db1# ps -aux | grep stat pgsql 1287 1.0 0.0 22832 4724 ?? Ss 11Mar11 4265:13.87 postgres: stats collector process (postgres) =20 It appears that these timeouts are affecting the performance of the application - sometimes it hangs for a few seconds before data gets returned, which was not the case before this. =20 =20 2011-12-22 03:45:04 MST WARNING: pgstat wait timeout 2011-12-22 03:45:04 MST WARNING: pgstat wait timeout 2011-12-22 03:45:04 MST WARNING: pgstat wait timeout 2011-12-22 03:45:04 MST WARNING: pgstat wait timeout 2011-12-22 03:45:41 MST WARNING: pgstat wait timeout 2011-12-22 03:45:41 MST WARNING: pgstat wait timeout 2011-12-22 03:45:41 MST WARNING: pgstat wait timeout 2011-12-22 03:46:18 MST WARNING: pgstat wait timeout 2011-12-22 03:46:18 MST WARNING: pgstat wait timeout 2011-12-22 03:47:32 MST WARNING: pgstat wait timeout 2011-12-22 03:47:32 MST WARNING: pgstat wait timeout 2011-12-22 03:47:32 MST WARNING: pgstat wait timeout 2011-12-22 03:48:09 MST WARNING: pgstat wait timeout 2011-12-22 03:48:09 MST WARNING: pgstat wait timeout 2011-12-22 03:48:09 MST WARNING: pgstat wait timeout 2011-12-22 03:49:26 MST WARNING: pgstat wait timeout =20 Runtime statistics setting for the database are as follows: =20 #----------------------------------------------------------------------- ------- # RUNTIME STATISTICS #----------------------------------------------------------------------- ------- =20 # - Query/Index Statistics Collector - =20 #track_activities =3D on #track_counts =3D on #track_functions =3D none # none, pl, all #track_activity_query_size =3D 1024 # (change requires restart) =20 # On FreeBSD, this is a performance hog, so keep it off if you need speed =20 update_process_title =3D off #update_process_title =3D on #stats_temp_directory =3D 'pg_stat_tmp' =20 =20 # - Statistics Monitoring - =20 #log_parser_stats =3D off #log_planner_stats =3D off #log_executor_stats =3D off #log_statement_stats =3D off =20 =20 ------_=_NextPart_001_01CCC0C7.592F3C41 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

About a = month ago, I started receiving quite a few pgstat timeouts on my = production database.

PostgreSQL 9.0.3 = on amd64-portbld-freebsd8.1, compiled by GCC cc (GCC) 4.2.1 = 20070719  [FreeBSD], 64-bit

I am = not sure where to start looking for the cause.

Database has been up since march without any = restart

 

db1# ps -aux | grep stat

pgsql      1287 =  1.0  0.0 22832  4724  ??  Ss   = 11Mar11 4265:13.87 postgres: stats collector process    = (postgres)

 

It appears that these timeouts are affecting the = performance of the application – sometimes it hangs for a few = seconds before data gets returned, which was not the case before = this.

 

 

2011-12-22 = 03:45:04 MST WARNING:  pgstat wait timeout

2011-12-22 03:45:04 MST WARNING:  pgstat wait = timeout

2011-12-22 03:45:04 MST = WARNING:  pgstat wait timeout

2011-12-22 03:45:04 MST WARNING:  pgstat wait = timeout

2011-12-22 03:45:41 MST = WARNING:  pgstat wait timeout

2011-12-22 03:45:41 MST WARNING:  pgstat wait = timeout

2011-12-22 03:45:41 MST = WARNING:  pgstat wait timeout

2011-12-22 03:46:18 MST WARNING:  pgstat wait = timeout

2011-12-22 03:46:18 MST = WARNING:  pgstat wait timeout

2011-12-22 03:47:32 MST WARNING:  pgstat wait = timeout

2011-12-22 03:47:32 MST = WARNING:  pgstat wait timeout

2011-12-22 03:47:32 MST WARNING:  pgstat wait = timeout

2011-12-22 03:48:09 MST = WARNING:  pgstat wait timeout

2011-12-22 03:48:09 MST WARNING:  pgstat wait = timeout

2011-12-22 03:48:09 MST = WARNING:  pgstat wait timeout

2011-12-22 03:49:26 MST WARNING:  pgstat wait = timeout

 

Runtime statistics setting for the database are as = follows:

 

#------------------------------------------------------= ------------------------

# RUNTIME = STATISTICS

#------------------------------------------------------= ------------------------

         &= nbsp;           &n= bsp;           &nb= sp;     

# = - Query/Index Statistics Collector -

         &= nbsp;           &n= bsp;           &nb= sp;     

#track_activities =3D on

#track_counts =3D on

#track_functions =3D = none           &nb= sp;     # none, pl, all

#track_activity_query_size =3D = 1024       # (change requires = restart)

         &= nbsp;           &n= bsp;           &nb= sp;     

# = On FreeBSD, this is a performance hog, so keep it off if you need = speed  

update_process_title =3D off

#update_process_title =3D on

#stats_temp_directory =3D = 'pg_stat_tmp'

         &= nbsp;           &n= bsp;           &nb= sp;     

         &= nbsp;           &n= bsp;           &nb= sp;      

# - Statistics Monitoring -

         &= nbsp;           &n= bsp;           &nb= sp;     

#log_parser_stats =3D off

#log_planner_stats =3D off

#log_executor_stats =3D off

#log_statement_stats =3D off

 

 

------_=_NextPart_001_01CCC0C7.592F3C41--