Re: Stucks in the middle - Mailing list pgsql-sql

From Steve Midgley
Subject Re: Stucks in the middle
Date
Msg-id CAJexoS+_J=eeMF3dptbs0GAgCcmMjQuiBeXZjJ_DBzsAYHBpog@mail.gmail.com
Whole thread Raw
In response to Stucks in the middle  (Yevgeny <jebjick@gmail.com>)
List pgsql-sql
On Tue, Dec 29, 2015 at 3:11 AM, Yevgeny <jebjick@gmail.com> 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

pgsql-sql by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Stucks in the middle
Next
From: Tim Dudgeon
Date:
Subject: question on row level security