Re: Some sql query got stuck in poll.

From: Pavan Pandey <pavan(dot)pandey(at)globallogic(dot)com>
To: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: Some sql query got stuck in poll.
Date: 2014-09-27 06:07:36
Message-ID: CAO38WBfTzFnmMepUVM2hiXjDKvonjk-b8GqnH8tuovHBPqQqFQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

We have waited for ~45 seconds to wait for response from server and client
is restarted after this time period to avoid situation to stuck application
for indefinite time.
In further analysis i can see that some bad logic is done for coordination
of retry_count and no_timeout in code of Wait_for_ready_socket function
that is actually causing indefinite waiting in poll for case of non-zero
value in retry_count.

I think that logic should be corrected. Please let me know if there is any
possibility to correct it.

On Fri, Sep 26, 2014 at 11:54 PM, Heikki Linnakangas <
hlinnakangas(at)vmware(dot)com> wrote:

> On 09/25/2014 01:42 PM, Pavan wrote:
>
>> Hi,
>>
>> I have application running in multi-threaded architecture and application
>> updates DB from data in cache periodically . But unfortunately we are
>> getting some query got stuck in poll for indefinite time. This behavior is
>> happened some time with application but not any particular scenario. We
>> can
>> not reproduce it always it's random issue. We have design to restart
>> application if it got stuck for more than specified time period.
>>
>> I have attached some back trace for query processing as below:
>>
>
> It looks like the driver is waiting for a reply from the server. In other
> words, it looks like the server is busy executing the query, and the client
> is waiting for it. How long did you wait? Did you check what's happening in
> the server when that happens?
>
> - Heikki
>
>

--
Best Regards,

*Pavan Kumar Pandey | Senior Software Engineer*
GlobalLogic Inc. | Innovation by Design
Tower A, Oxygen Park SEZ, Plot No. 7, Sec - 144, Noida 201304, U.P. India
Office: +91 120 406 2000 X2203 | Mobile: +91 931 027 0452 |
www.globallogic.com

In response to

Browse pgsql-odbc by date

  From Date Subject
Next Message pieri70 2014-09-30 08:35:34 Win 7 x64 odbc call failed
Previous Message Heikki Linnakangas 2014-09-26 18:24:50 Re: Some sql query got stuck in poll.