Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aDyy1-0006s0-R8 for pgsql-sql@arkaria.postgresql.org; Tue, 29 Dec 2015 18:25:53 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aDyy1-0006Us-2d for pgsql-sql@arkaria.postgresql.org; Tue, 29 Dec 2015 18:25:53 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aDyvX-0004Ei-1L for pgsql-sql@postgresql.org; Tue, 29 Dec 2015 18:23:19 +0000 Received: from sanddollar.geekisp.com ([216.168.135.167]) by magus.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aDyvS-0005mA-Cr for pgsql-sql@postgresql.org; Tue, 29 Dec 2015 18:23:18 +0000 Received: (qmail 21709 invoked by uid 1003); 29 Dec 2015 18:23:12 -0000 Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=misuse.org; b=X/qfhMkj7GepGUY44miKSR1Dq/rZoMpM3Jihl7erJzxwHCRoypbfzyi86radKlQEZBoSoYdNh3OoFmVMKPEbUvB7KsZtPeov8S/l+SCkeIN2OFxHImcwyPEzc1+tss4l ; Received: from unknown (HELO mail-oi0-f44.google.com) (steve@misuse.org@209.85.218.44) by mail.geekisp.com with (RC4-SHA encrypted) SMTP; 29 Dec 2015 18:23:12 -0000 Received: by mail-oi0-f44.google.com with SMTP id o62so186392916oif.3 for ; Tue, 29 Dec 2015 10:23:12 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.202.206.131 with SMTP id e125mr29644559oig.132.1451413391254; Tue, 29 Dec 2015 10:23:11 -0800 (PST) Received: by 10.202.205.23 with HTTP; Tue, 29 Dec 2015 10:23:11 -0800 (PST) In-Reply-To: <1451387504879-5879395.post@n5.nabble.com> References: <1451387504879-5879395.post@n5.nabble.com> Date: Tue, 29 Dec 2015 10:23:11 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Stucks in the middle From: Steve Midgley To: Yevgeny Cc: pgsql-sql@postgresql.org Content-Type: multipart/alternative; boundary=001a113d30b69bb0dd05280d8318 X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org --001a113d30b69bb0dd05280d8318 Content-Type: text/plain; charset=UTF-8 On Tue, Dec 29, 2015 at 3:11 AM, Yevgeny wrote: > Hello, > > I have a problem. Sometimes the whole sites stucks in the middle (doesn't > matter which page is opened) because of some sql issue. > When i reboot postresql it starts working good immediately. > But when it's stuck i can see in the log that new and new queries are > running, meaning it's stuck only for my session. > > What can be a reason and how can i solve this problem? > There are a lot of possible reasons, and I think you'll need to provide more details to get any accuracy on guesses from the list. Here are a few ideas: - You have a middle tier app which is failing to release cursor or other type of open query - You have a deadlock situation in Pg where you are mutually locking a row in some way that prevents your process from completing - You are executing a query that is very long running (not optimized) so your connection appears blocked but is in fact just taking forever to complete Steve --001a113d30b69bb0dd05280d8318 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On T= ue, Dec 29, 2015 at 3:11 AM, Yevgeny <jebjick@gmail.com> wro= te:
Hello,

I have a problem. Sometimes the whole sites stucks in the middle (doesn'= ;t
matter which page is opened) because of some sql issue.
When i reboot postresql it starts working good immediately.
But when it's stuck i can see in the log that new and new queries are running, meaning it's stuck only for my session.

What can be a reason and how can i solve this problem?

There are a lot of possible reasons, and I think you'll= need to provide more details to get any accuracy on guesses from the list.= Here are a few ideas:
  • You have a middle tier app which i= s failing to release cursor or other type of open query
  • You hav= e a deadlock situation in Pg where you are mutually locking a row in some w= ay that prevents your process from completing
  • You are executing a q= uery that is very long running (not optimized) so your connection appears b= locked but is in fact just taking forever to complete
Steve
--001a113d30b69bb0dd05280d8318--