pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ilya Bazylchuk <ilya.bazylchuk@gmail.com>
To: Venkata Balaji N <nag1010@gmail.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: Postgresql 9.4.1 stuck all queries when making multi updates
Date: Sat, 4 Apr 2015 12:34:20 +0300
Message-ID: <B1E16D26-4432-4246-AC06-789ED474486D@gmail.com> (raw)
In-Reply-To: <CAEyp7J-cTXoOZX0pKYN+pd9W4poXdr7vBvcq2yp6JFiN=2iE6Q@mail.gmail.com>
References: <24169366-5D72-4363-8F60-529442AD39BF@gmail.com>
	<CAEyp7J-cTXoOZX0pKYN+pd9W4poXdr7vBvcq2yp6JFiN=2iE6Q@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

nothing in pgpool. Pgpool use only resque/sidekiq. Rest use unicorn directly to master.
1. 45 connections
2. 45 connections
3. 30 connections
4. 10 connections

When connections stucks, growth count connections from unicorn only. Seems it not granted locks, but weird that i didn’t have it on 9.3.

In general didn’t change except new pg servers.

I added log for not granted locks, and in 12 hours got only one, and it was short and on another table, which never presented in pg logs. will see more.

lock_timeout: 30000
deadlock_timeout: 1s
statement_timeout: 0

I know that set statement_timeout isn’t recommended, but what’s better solution, don’t get stuck db?


> 4 апр. 2015 г., в 3:10, Venkata Balaji N <nag1010@gmail.com> написал(а):
> 
> 
> On Fri, Apr 3, 2015 at 10:14 PM, Ilya Bazylchuk <ilya.bazylchuk@gmail.com <mailto:ilya.bazylchuk@gmail.com>> wrote:
> Before i used 9.3.5 and servers with ubuntu 12 with 32GB memory.
> 
> After upgrade to 9.4.1, with more power server 60GB memory on each in wall replication and ubuntu 14, started get db stucks when run multi update from resque/sidekiq background workers. resque/sidekiq work via pgpool 3.3
> 
> Do you see any messages in pgpool logs ?
>  
> Queries can be as simple, update column where primary id = id. and complex, doesn't metter. usually average connections about less 300, but when queries stucks, count connections grow to maximum and i get
> 
> LOG:  process 16121 still waiting for ShareLock on transaction 2448707428 after 1000.121 ms
> DETAIL:  Process holding the lock: 16139. Wait queue: 16121.
> LOG:  process 16146 still waiting for ExclusiveLock on tuple (665346,11) of relation 997395 of database 16455 after 1000.102 ms
> DETAIL:  Process holding the lock: 16121. Wait queue: 16146.
> ERROR:  canceling statement due to lock timeout
> 
> Any idea, how long the locks were hanging in there for ?
> Do you have any SQL timeouts configured in postgresql.conf ?
>  
> then
> 
> FATAL:  sorry, too many clients already
> then only restart help, when run restart got this
> 
> WARNING:  terminating connection because of crash of another server process
> DETAIL:  The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
> HINT:  In a moment you should be able to reconnect to the database and repeat your command.
> 
> This precisely means, one of the connections got crashed/killed.
> 
> Regards,
> Venkata Balaji N
> 
> Fujitsu Australia

view thread (3+ messages)

Message-ID: <B1E16D26-4432-4246-AC06-789ED474486D@gmail.com>
Permalink:  ../B1E16D26-4432-4246-AC06-789ED474486D@gmail.com/
Also on:    postgresql.org/message-id/B1E16D26-4432-4246-AC06-789ED474486D@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: ilya.bazylchuk@gmail.com, nag1010@gmail.com
  Subject: Re: Postgresql 9.4.1 stuck all queries when making multi updates
  In-Reply-To: <B1E16D26-4432-4246-AC06-789ED474486D@gmail.com>
  References: <24169366-5D72-4363-8F60-529442AD39BF@gmail.com> <CAEyp7J-cTXoOZX0pKYN+pd9W4poXdr7vBvcq2yp6JFiN=2iE6Q@mail.gmail.com> <B1E16D26-4432-4246-AC06-789ED474486D@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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