pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Mohit Kumar Sahni <Mohit.Sahni@india.nec.com>
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Cc: Maneesh Kumar Singh <maneesh.singh@india.nec.com>
Subject: Re: Connection Drop from PostgreSQL Database Server
Date: Tue, 5 Mar 2019 21:09:11 -0800
Message-ID: <a017e405-ba14-d4b9-8d35-769425643cc3@aklaver.com> (raw)
In-Reply-To: <OSAPR01MB205216717DA1638EF48FCFDABC730@OSAPR01MB2052.jpnprd01.prod.outlook.com>
References: <TYAPR01MB2063E77CF28C350045ABEACFBC720@TYAPR01MB2063.jpnprd01.prod.outlook.com>
	<4fe719b0-1566-76c4-36c3-3f6548e31f5e@aklaver.com>
	<OSAPR01MB205216717DA1638EF48FCFDABC730@OSAPR01MB2052.jpnprd01.prod.outlook.com>

On 3/5/19 7:13 PM, Mohit Kumar Sahni wrote:
> Hi Adrian,
> 
> I have checked my log files. Here are some of the lines that I think were logged at the time of connection drop:
> 2019-03-03 15:57:33.444 UTC [7146] azpostgres@master_configuration_db LOG:  could not receive data from client: Connection timed out
> 2019-03-03 15:57:33.444 UTC [13161] azpostgres@master_configuration_db LOG:  could not receive data from client: Connection timed out
> 2019-03-03 15:57:33.444 UTC [7571] azpostgres@master_configuration_db LOG:  could not receive data from client: Connection timed out
> 2019-03-03 15:57:33.446 UTC [14459] azpostgres@master_configuration_db LOG:  could not receive data from client: Connection timed out
> 2019-03-03 15:57:33.448 UTC [18010] azpostgres@postgres LOG:  could not receive data from client: Connection timed out

Where is the client running relative to the server?

Does Azure Cloud have a timeout set for connections?

> 
> And for the parameters, I have tried following values:
> 1. tcp_keepalive_idle: 10000 & 2700
> 2. tcp_keepalive_interval: 10000 & 2600
> 3. tcp_keepalive_count: 0 & 1
> 4. session_timeout: 20000
> 
> All the values couldn't solve the problem.
> 
> Thanks
> Mohit Kumar Sahni
> 
> ________________________________________
> From: Adrian Klaver <adrian.klaver@aklaver.com>
> Sent: Wednesday, March 6, 2019 6:19 AM
> To: Mohit Kumar Sahni; pgsql-general@lists.postgresql.org
> Cc: Maneesh Kumar Singh
> Subject: Re: Connection Drop from PostgreSQL Database Server
> 
> On 3/5/19 4:19 AM, Mohit Kumar Sahni wrote:
>> I have done a setup over Azure Cloud for my PostgreSQL DB.
>> It's Ubuntu 18.04 LTS (4vCPU, 8GB RAM) machine with PostgreSQL 9.6 version.
>> The problem that occurring is, when the connection to the postgresql db stays idle for some time let's say 2 to 10 minutes then the connection to the db does not respond such that it doesn't fulfil the request and keep processing the query.
>> Same goes with my JAVA Springboot Application. The connection doesn't respond and the query keep processing.
> 
> Is there anything in the Postgres log that is relevant?
> 
> The same for the OS system log?
> 
>>
>> This happens randomly such that the timing is not traceable sometimes it happens in 2 minutes, sometimes in 10 minutes & sometimes don't.
>> I have tried with PostgreSQL Configuration file parameters. I have tried:
>> tcp_keepalive_idle, tcp_keepalive_interval, tcp_keepalive_count.
>> Also statement_timeout & session_timeout parameters but it doesn't change anyway.
> 
> What values for the above?
> 
>>
>> Thank you
>>
> 
> 
> --
> Adrian Klaver
> adrian.klaver@aklaver.com
> 
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com




view thread (3+ messages)

Message-ID: <a017e405-ba14-d4b9-8d35-769425643cc3@aklaver.com>
Permalink:  ../a017e405-ba14-d4b9-8d35-769425643cc3@aklaver.com/
Also on:    postgresql.org/message-id/a017e405-ba14-d4b9-8d35-769425643cc3@aklaver.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-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, Mohit.Sahni@india.nec.com, maneesh.singh@india.nec.com
  Subject: Re: Connection Drop from PostgreSQL Database Server
  In-Reply-To: <a017e405-ba14-d4b9-8d35-769425643cc3@aklaver.com>
  References: <TYAPR01MB2063E77CF28C350045ABEACFBC720@TYAPR01MB2063.jpnprd01.prod.outlook.com> <4fe719b0-1566-76c4-36c3-3f6548e31f5e@aklaver.com> <OSAPR01MB205216717DA1638EF48FCFDABC730@OSAPR01MB2052.jpnprd01.prod.outlook.com> <a017e405-ba14-d4b9-8d35-769425643cc3@aklaver.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