Re: [pgAdmin][RM4818] Unable to handle loss of connection to server

From: Aditya Toshniwal <aditya(dot)toshniwal(at)enterprisedb(dot)com>
To: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Cc: Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com>
Subject: Re: [pgAdmin][RM4818] Unable to handle loss of connection to server
Date: 2019-11-21 06:28:02
Message-ID: CAM9w-_mgFYfzBj=22zXwcXSWatHVO7qfN4XVWkqWpDx4+i=g6Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

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(dot)toshniwal(at)enterprisedb(dot)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(dot)joshi(at)enterprisedb(dot)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(dot)toshniwal(at)enterprisedb(dot)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"

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Akshay Joshi 2019-11-21 07:38:44 Re: [pgAdmin][RM4696] Add RE-SQL/MSQL test cases for Materialized View
Previous Message Aditya Toshniwal 2019-11-21 06:20:58 Re: [pgAdmin][RM4818] Unable to handle loss of connection to server