Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iXfxM-0002gF-GM for pgadmin-hackers@arkaria.postgresql.org; Thu, 21 Nov 2019 06:28:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iXfxL-0005i2-1P for pgadmin-hackers@arkaria.postgresql.org; Thu, 21 Nov 2019 06:28:43 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iXfxK-0005hv-If for pgadmin-hackers@lists.postgresql.org; Thu, 21 Nov 2019 06:28:42 +0000 Received: from mail-ot1-x329.google.com ([2607:f8b0:4864:20::329]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1iXfxH-0000GE-Ej for pgadmin-hackers@postgresql.org; Thu, 21 Nov 2019 06:28:41 +0000 Received: by mail-ot1-x329.google.com with SMTP id b16so1940360otk.9 for ; Wed, 20 Nov 2019 22:28:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=eGiFdnHuXVYxWEpAf8Mv+HfsHosacIL9o+5VS74T83k=; b=bmubA1SfY43eAWq0ojrdeSK8j10+Yf014BT6WddkkQ5zYAsjaaFf7XQ6bdgjhmHC5S OOTtzNV30uOhO7tKm932N6P+HFWoRlfabj2h2Fpc2n/beFsxEnWrvQS7Y9l9ppMGbNHR 8N8y2N/ZMtP6w4tjA1/hgTsoYmf0d+eQavLvlvY5sRjVFDuvuIey0Gy0B6IciUa7XeIe PwAkxKma4Pvc/YesVkLIbllWpg4EcDe9sLQmoedQogtx9qUFhaZZCrWRF5cegpNRlZmi Dj5OjAgChuXmav1j9uvFbr7sYpdn4GDCPOYc4Rq6eqcSN6elL/GpBHh+g36SEnGhEiby eXhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=eGiFdnHuXVYxWEpAf8Mv+HfsHosacIL9o+5VS74T83k=; b=iX3dYe07h2EXCoqFJkkj2O8m4kdwEFPX5QUMWRHZZxtR29/V1rsD2E3n6al0ctEqjv 7HRvPUluyt/guHNUIljzZWjH0NDGZpVaT4zbCFnbaQn7EsUza5zMFESbEiYODradyNfI RcbmBBTTRtu2QhRVNQJlavPiu6UNhMf8T3w2kyJS3Vc2CXo1aHdLkRKavC87Ye9c2I6Q r13ulRtyauXskMyzQEXgqvN9Jlqy21wd0TXP2HBqN1hS69zcUY2Xi9qaeevyaK4Stjh4 mLvEit8wRKdAs9ggf+4De2YQOHNlJPM5GlNKCBiYpPKIehMGa3DVr0rdSiKpS9tYpRxw 7MSg== X-Gm-Message-State: APjAAAW3qUdTpS6hpIAmzcrez0xqv24lR1AHGGK6ks1CKMCz7L8OPjQH ZkSIbGuj/mps4OtdcWJJ6NTVaYSqNCoCV3Mu1N/gZwC2bK0NTau1JlN68Xp1Bkf3s4jABxezf2e 2C4CJErxZO39bVz0R70ybu/cPGDIg+ouIeZmE1U7fU9ovbfehIpqJ1pNByT04BYL8mBZU5xe6lk TykZosufxtE6ME17qGsL8TPnJyMKtmoRFkns4vTFeoC1OeMyQ7/ajZuA== X-Google-Smtp-Source: APXvYqwqBqzcdL+yqz/feZvFWFxM0nvB7QU+QtMqqR4TF26bue+5ronmAs+fw6mhMnEp+NY5up6b8VH4T5sXtfQKuuQ= X-Received: by 2002:a9d:648f:: with SMTP id g15mr5184592otl.195.1574317718393; Wed, 20 Nov 2019 22:28:38 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Aditya Toshniwal Date: Thu, 21 Nov 2019 11:58:02 +0530 Message-ID: Subject: Re: [pgAdmin][RM4818] Unable to handle loss of connection to server To: pgadmin-hackers Cc: Akshay Joshi Content-Type: multipart/alternative; boundary="0000000000005e66400597d568e1" X-CLOUD-SEC-AV-Info: edb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --0000000000005e66400597d568e1 Content-Type: text/plain; charset="UTF-8" Hi, I forgot to mention, I've also changed the dashboard code. The dashboard was sending graph data requests, but when the server lost connection the requests remains pending for longer time. Because of this the server gets flooded with lot of pending request and in turn slowing down the entire application. Code is changed so that only a certain number of requests remain pending (currently 3), above which the request won't be sent. On Thu, Nov 21, 2019 at 11:50 AM Aditya Toshniwal < aditya.toshniwal@enterprisedb.com> wrote: > Hi Hackers, > > Attached is the updated patch to fix the review comments. > Please note, there is some problem with psycopg2/libpq where it hangs when > network is lost - https://github.com/psycopg/psycopg2/issues/561 > I've also changed the code to make connections after the "Servers" node is > expanded to fix - RM4933, so that the servers are listed first. > > Kindly review. > > On Fri, Nov 15, 2019 at 2:34 PM Akshay Joshi < > akshay.joshi@enterprisedb.com> wrote: > >> Hi Aditya >> >> Following are the review comments: >> >> 1. The default connection timeout should be *10* seconds. >> 2. In case the network is disabled and when we expand the "Servers" >> node the database server(for which network is disabled) should be shown in >> the disconnected state. >> 3. For the above case when you try to connect to the server and at >> the same time trying to fetch the properties of the valid database server, >> it takes long time to fetch it. >> 4. Case when the network is disabled, the database servers password >> is saved and pgAdmin4 tries to connect the server, after connection >> timeout, there is no message to the user, only spinner gets disappeared. We >> should show a message. >> 5. We should improve the error messages "timeout expired" and >> "Connection to the servers has been lost." to the more meaningful messages >> like "Check the network settings, check the firewall status." >> 6. Install database server on Windows and Enable Windows Firewall. >> Try to connect to the same database server. Spinner is not showing, as a >> user I am not able to understand is there any action started at the backend >> or not. As a user, I'll keep trying to connect multiple times and after the >> connection timeout of each request dialog pops up. >> >> >> On Thu, Nov 14, 2019 at 12:15 PM Aditya Toshniwal < >> aditya.toshniwal@enterprisedb.com> wrote: >> >>> Hi Hackers, >>> >>> Attached is the workaround patch to set the default connection timeout >>> to 30 seconds instead of the current value of infinite - 0, zero. The input >>> is present in the server properties dialogs advanced tab. The workaround >>> applies to the RM4724 as well. >>> The permanent solution would be to expand the nodes asynchronously - >>> https://redmine.postgresql.org/issues/4933 >>> >>> Also fixed a bug where sql editor is not closing if the server is >>> disconnected in between. >>> >>> Kindly review. >>> >>> -- >>> Thanks and Regards, >>> Aditya Toshniwal >>> Sr. Software Engineer | EnterpriseDB India | Pune >>> "Don't Complain about Heat, Plant a TREE" >>> >> >> >> -- >> *Thanks & Regards* >> *Akshay Joshi* >> >> *Sr. Software Architect* >> *EnterpriseDB Software India Private Limited* >> *Mobile: +91 976-788-8246* >> > > > -- > Thanks and Regards, > Aditya Toshniwal > Sr. Software Engineer | EnterpriseDB India | Pune > "Don't Complain about Heat, Plant a TREE" > -- Thanks and Regards, Aditya Toshniwal Sr. Software Engineer | EnterpriseDB India | Pune "Don't Complain about Heat, Plant a TREE" --0000000000005e66400597d568e1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

I forgot to mention, I've also changed the dashboa= rd code. The dashboard was sending graph data requests, but when the server= lost connection the requests remains pending for longer time. Because of t= his the server gets flooded with lot of pending request and in turn slowing= down the entire application.
Code is changed so that only a certain number= of requests remain pending (currently 3), above which the request won'= t be sent.

On Thu, Nov 21, 2019 at 11:50 AM Aditya Toshniwal <aditya.toshniwal@enterprise= db.com> wrote:
Hi Hackers,

Attached is the up= dated patch to fix the review comments.
Please note, there is some problem = with psycopg2/libpq where it hangs when network is lost -=C2=A0https://github.com/psycopg/psycopg2/= issues/561
I've also changed the code to make connections after the= "Servers" node is expanded to fix - RM4933, so that the servers = are listed first.

Kindly review.

On Fri, Nov 15, 2019 at 2:34 PM = Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:
Hi=C2=A0Aditya
<= br>
Following are the review comments:
  1. The default co= nnection timeout should be 10 seconds.
  2. In case the network i= s disabled and when we expand the "Servers" node the database ser= ver(for which network is disabled) should be shown in the disconnected stat= e.
  3. =C2=A0For the above case when you try to connect to the server a= nd at the same time trying to fetch the properties of the valid database se= rver, it takes long time to fetch it.
  4. =C2=A0Case when the network i= s disabled, the database servers password is saved and pgAdmin4 tries to co= nnect the server, after connection timeout, there is no message to the user= , only spinner gets disappeared. We should show a message.
  5. We shoul= d improve the error messages "timeout expired" and "Connecti= on to the servers has been lost." to the more meaningful messages like= "Check the network settings, check the firewall=C2=A0status."
  6. Install database server on Windows and Enable Windows Firewall. Try t= o connect to the same database server. Spinner is not showing, as a user I = am not able to understand is there any action started at the backend or not= . As a user, I'll keep trying to connect multiple times and after the c= onnection timeout of each request dialog pops up.

On T= hu, Nov 14, 2019 at 12:15 PM Aditya Toshniwal <aditya.toshniwal@enterprisedb= .com> wrote:
Hi Hacke= rs,

Attached is the workaround patch to set= the default connection timeout to 30 seconds instead of the current value = of infinite - 0, zero. The input is present in the server properties dialog= s advanced tab. The workaround applies to the RM4724 as well.
The permanent solution would be to ex= pand the nodes asynchronously -=C2=A0https://redmine.postgresql.org/issues/4933

Also fixed a bug where sql editor is not closing if the server= is disconnected in between.

Kindly review.=

--
Thanks and Regards,
Aditya Toshniwal
Sr. Software Engineer |=C2= =A0EnterpriseDB India |=C2=A0Pune
"Don't Complain about Heat, Plant a TREE"<= /font>


--
Thanks & Regards
Akshay Joshi
<= font color=3D"#3333FF">Sr. Software Architect=
<= font color=3D"#000000" face=3D"arial, sans-serif">EnterpriseDB Software = India Private Limited
Mobile: +91 976-788-8246=


--
Th= anks and Regards,
Aditya = Toshniwal
Sr. Software Engineer |=C2=A0EnterpriseDB India |=C2=A0Pune
"Don't Complain a= bout Heat, Plant a TREE"


--
Thanks and Regards,
Aditya Toshniwal
Sr. Software Engineer |=C2=A0EnterpriseDB In= dia |=C2=A0Pune
"Don't Complain about Heat, Plant a TREE"
=
--0000000000005e66400597d568e1--