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 1iXkUD-0004hj-Ct for pgadmin-hackers@arkaria.postgresql.org; Thu, 21 Nov 2019 11:18:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iXkUB-0007f6-HK for pgadmin-hackers@arkaria.postgresql.org; Thu, 21 Nov 2019 11:18:55 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iXkUB-0007ey-50 for pgadmin-hackers@lists.postgresql.org; Thu, 21 Nov 2019 11:18:55 +0000 Received: from mail-io1-xd2e.google.com ([2607:f8b0:4864:20::d2e]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iXkU3-0000wX-Lg for pgadmin-hackers@postgresql.org; Thu, 21 Nov 2019 11:18:54 +0000 Received: by mail-io1-xd2e.google.com with SMTP id v17so2888223iol.12 for ; Thu, 21 Nov 2019 03:18:47 -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=A27MxLWp+iH8i+ZtxQls4bxPkfmJyFQ04ZzuICZnvzM=; b=ghd93syLwVkIJoOUPrjxfWOlF0CS8rl5QAcaqXAFZj4v6GNJq5yTJ1fVsp5rnYwkAa kvrtPcV6DwUt4P5XoLg5Osy9MKcyoF2UJxt9o5euCcvTRpC1doducQzO1vjoxEbqNisR lX6xjj3iePzVCWMxibDwewx2If+vYO2A9HxathMWJVAaR93NglbiTVvZYmvHFvwo8JIL bAeTmcPP/q6PkBcZVmaZRczMVgy28TSYJT+kp9M5vZVvws3WztJ/tD8XIf0aNaczl4T6 uI3KH7gXTioPLwjlJtPsKay4Rm6dEeAtHxbL061znTpUxjao3Wmld7Z/+4xbFyVeRcCl c9AA== 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=A27MxLWp+iH8i+ZtxQls4bxPkfmJyFQ04ZzuICZnvzM=; b=bqCg+ofygxKRMx8aY78K+vQZh8HdFhMJp1DpsLJPc/mmGcqec2Z7Db3uKPX+qQy7vO XkQ7ML/fV2xkjm4Gyqy/o8X57Lwhn6i3F4r3zQnuzBV10+//UXWD6oJZ+sa09eZTilOL 5A+m4L/16SoKFfmpySI8PaeaW/j20lDQO34H7nmh4ksdE0N7+r1MaQDwY7G1KkSPCHIm Du/MgZ7cSrgETj2SPBEaNg+FycLF1uvrj6PT5e6sDh4XkqZZeK2Z4ACFdqbeQDl8acNY r0bTtl4cfJdYFumPha0jKIQuhey+6Y7LftRsBgSG3EhkbY30ni/Gz6WuFB5R9XNp1WbL JDRQ== X-Gm-Message-State: APjAAAXO4+0thrfzHaYlVVWCctVzBirTMwzjBlBAnW8Wmb2mHmQYVAAW 9V6UHc+Akuhp9oJmO//4detlhrOui7cDMbtzk6Lhkib+0JH72TuKfXyZ2P1Dv+MCz3wkxXE0VEC SYo1FZPXxauVAY54fK+W65XG/UjMo5zn+SxyeMY37jHjqGJ49ZJN/0Rm36d26irvt07sIpTPsDH b2qq+ty150hzcVWgRER+xapo2qE4TxMZW0DRZgIUgf+8e9hdCV7DU= X-Google-Smtp-Source: APXvYqydVjuZ04Uo/griJMu3E2cGF+K3tvNh0nqNO3FobAbirKNxWd0yqihFvqnlEJqPGM/OnPshXK05F2nBe2UgfpE= X-Received: by 2002:a6b:ec08:: with SMTP id c8mr2318669ioh.257.1574335125273; Thu, 21 Nov 2019 03:18:45 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Akshay Joshi Date: Thu, 21 Nov 2019 16:48:34 +0530 Message-ID: Subject: Re: [pgAdmin][RM4818] Unable to handle loss of connection to server To: Aditya Toshniwal Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary="000000000000e6574f0597d97573" 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 --000000000000e6574f0597d97573 Content-Type: text/plain; charset="UTF-8" Hi Aditya Following are the review comments: - Update the timeout in the comment section from 30 seconds to 10 seconds in aff1436e3c8c_.py. - Asking for the database server password even if it is saved. Reproduction steps: - Connect to the database server, saved the password. - Disabled the network. Try to connect to the database server. - Enable the network, try to connect to the database server. - No error/spinner visible on GUI when the database server is connected using SSH Tunnel. Reproduction steps: - Connect to the database server with SSH Tunnel, saved both the password. - Disabled the network and Reset the Layout. - Expand the Servers node and try to connect the same database server. On Thu, Nov 21, 2019 at 11:58 AM Aditya Toshniwal < aditya.toshniwal@enterprisedb.com> wrote: > 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" > -- *Thanks & Regards* *Akshay Joshi* *Sr. Software Architect* *EnterpriseDB Software India Private Limited* *Mobile: +91 976-788-8246* --000000000000e6574f0597d97573 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi=C2=A0Aditya

Following are the review= comments:

  • Update the timeout in the comment sec= tion from 30 seconds to 10 seconds in=C2=A0aff1436e3c8c_.py.=C2=A0
  • Asking for the database server password even if=C2=A0it is= saved. Reproduction steps:
      • Connect= to the database server, saved the password.
      • Disabled the network. = Try to connect=C2=A0to the database server.
      • Enable the network, try= to connect to the database server.
  • No error/spinner vi= sible on GUI when the database server is connected using SSH Tunnel. Reprod= uction steps:
      • Connect to the databa= se server with SSH Tunnel, saved both the password.
      • Disabled the ne= twork and Reset the Layout.
      • Expand the Servers node and try to conn= ect the same database server.=C2=A0

    On Thu, Nov 21, 201= 9 at 11:58 AM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:
    Hi,

    <= div class=3D"gmail_default" style=3D"font-family:verdana,sans-serif">I forg= ot to mention, I've also changed the dashboard code. The dashboard was = sending graph data requests, but when the server lost connection the reques= ts remains pending for longer time. Because of this the server gets flooded= with lot of pending request and in turn slowing down the entire applicatio= n.
    Code is changed so that only a certain number of requests remain pending= (currently 3), above which the request won't be sent.

    <= div class=3D"gmail_quote">
    On Thu, Nov= 21, 2019 at 11:50 AM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:
    Hi Hackers,

    Attached is the updated patc= h to fix the review comments.
    I've also changed the code to make connections after the "Ser= vers" 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 Jos= hi <a= kshay.joshi@enterprisedb.com> wrote:
    Hi=C2=A0Aditya

    <= div>Following are the review comments:
    1. The default connection t= imeout should be 10 seconds.
    2. In case the network is disabled= and when we expand the "Servers" node the database server(for wh= ich network is disabled) should be shown in the disconnected state.
    3. =C2=A0For 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 t= akes long time to fetch it.
    4. =C2=A0Case 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 spi= nner 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 "Che= ck the network settings, check the firewall=C2=A0status."
    6. Inst= all 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 abl= e to understand is there any action started at the backend or not. As a use= r, 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&g= t; wrote:
    Hi Hackers,
    <= div style=3D"font-family:verdana,sans-serif">
    Attached is the workaround patch to set the defau= lt connection timeout to 30 seconds instead of the current value of infinit= e - 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 n= odes asynchronously -=C2=A0h= ttps://redmine.postgresql.org/issues/4933

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

    <= /div>
    Kindly review.

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


    --
    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"


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


    --
    Thanks & Regards
    =
    Akshay Joshi
    Sr. Software Architect
    EnterpriseDB Software India Private Limited
    =
    Mobile: += 91 976-788-8246
    --000000000000e6574f0597d97573--