Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WpISi-0002PB-Ey for pgsql-odbc@arkaria.postgresql.org; Tue, 27 May 2014 14:34:44 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WpISh-0004gl-Uc for pgsql-odbc@arkaria.postgresql.org; Tue, 27 May 2014 14:34:43 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1WpISh-0004gV-BA for pgsql-odbc@postgresql.org; Tue, 27 May 2014 14:34:43 +0000 Received: from smtp-outbound-2.vmware.com ([208.91.2.13]) by makus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1WpISc-0000R5-Lj for pgsql-odbc@postgresql.org; Tue, 27 May 2014 14:34:40 +0000 Received: from sc9-mailhost1.vmware.com (sc9-mailhost1.vmware.com [10.113.161.71]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id DE1CF28332; Tue, 27 May 2014 07:34:35 -0700 (PDT) Received: from zcs-prod-ext-mta-1.vmware.com (zcs-prod-ext-mta-1.vmware.com [10.113.62.223]) by sc9-mailhost1.vmware.com (Postfix) with ESMTP id D58D21B911; Tue, 27 May 2014 07:34:35 -0700 (PDT) Received: from zcs-prod-ext-mta-1.vmware.com (localhost.localdomain [127.0.0.1]) by zcs-prod-ext-mta-1.vmware.com (Postfix) with ESMTP id 258B5120030; Tue, 27 May 2014 07:34:45 -0700 (PDT) Received: from [192.168.1.90] (zimbra-prod-ext-proxy-vip.vmware.com [10.113.63.87]) by zcs-prod-ext-mta-1.vmware.com (Postfix) with ESMTPSA; Tue, 27 May 2014 07:34:44 -0700 (PDT) Message-ID: <5384A279.3090709@vmware.com> Date: Tue, 27 May 2014 17:34:33 +0300 From: Heikki Linnakangas Organization: VMware User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.5.0 MIME-Version: 1.0 To: malcolm.macleod@tshwanedje.com, "pgsql-odbc@postgresql.org" , "Itnal, Prakash (NSN - IN/Bangalore)" Subject: Re: Issue with retry_count in socket.c and fix for the same References: <6C8E163ED7EF5846B2F44CDBC63300112E6BAB@SGSIMBX002.nsn-intra.net> <5374A411.4090907@vmware.com> <1401122546.14277.8.camel@watchmen.homenetwork> In-Reply-To: <1401122546.14277.8.camel@watchmen.homenetwork> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -7.6 (-------) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-odbc Precedence: bulk Sender: pgsql-odbc-owner@postgresql.org On 05/26/2014 07:42 PM, Malcolm MacLeod wrote: > Just wanted to confirm that I have tracked this down as the cause for a > freeze/crash in our software as well. > I can get it to block forever on the select call just by > disconnecting/reconnecting network on a client a few times while it is > querying lots of data from the server. > I've tested the original patch and it does fix the issue, would be great > to see a final fix for this. Hmm, the driver enables TCP keepalives by default, which should eventually notice a broken connection. It can take a long time, though; I believe the default on most systems is two hours. Unfortunately there are no options in psqlODBC to change the defaults, but e.g. on Linux you can change the system-wide default with the tcp_keepalive_time sysctl. I think the missing feature here is to add psqlODBC configuration variables similar to libpq's keepalives_idle, keepalives_interval and keepalives_count. I'm not going to work on that myself, but patches are welcome. - Heikki -- Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-odbc