Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jzVI6-0007UX-DR for pgsql-general@arkaria.postgresql.org; Sun, 26 Jul 2020 01:17:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jzVI3-0007Kz-5C for pgsql-general@arkaria.postgresql.org; Sun, 26 Jul 2020 01:17:23 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jzVI2-0007Ks-5v for pgsql-general@lists.postgresql.org; Sun, 26 Jul 2020 01:17:22 +0000 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jzVHv-0001T7-ID for pgsql-general@postgresql.org; Sun, 26 Jul 2020 01:17:21 +0000 Received: by mail-pl1-x643.google.com with SMTP id d1so6354559plr.8 for ; Sat, 25 Jul 2020 18:17:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id :disposition-notification-to:date:user-agent:mime-version :in-reply-to:content-language; bh=6OV1lx/GHKMVyCtYquFnbm5v5zUnuc6r7kC1HvPb/b4=; b=JV6OfKPA0BnEzyyQwCKYf/zuOEphhX4QMICO2ArENd9y66z0+/km+ExmHvoKqjlqDx LWvY9IGerMkfGIBZjTye4zErYOg04Ke583X2yy4v1rS/HiegiAhoFAZ9MGSB/UQ4RzLE hjYwgxqkWUctNMUOvqsEEMxNarI+PepYhfvPhHB+bivfxVxVxNlty9yeMKXNfaLeXmA0 XgGIjNP1JOE79dT8XQL1HVNQIWsxTYQJfpDXy7DdqiA5+KKvYsVUiltWMHnvMWkLdvUe 2gXW+ahpEGCdNP8SKoaYGHRwFI/epcvFb9/g6z9TqXrhSW0XnTTCPmFLVY59vUdV3Q9q jw7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id :disposition-notification-to:date:user-agent:mime-version :in-reply-to:content-language; bh=6OV1lx/GHKMVyCtYquFnbm5v5zUnuc6r7kC1HvPb/b4=; b=rywX/4J5xlhKrUM4OU/tYVne4UEAc9DoTkPVuEGQYEkaLfhwLLHQyQ1facR8t0Gj/1 rYz7u6oQEya2kCI8BYAX+R5pdXhuYgFQMp0Gz6UCGA9HXwYmDwu80Oi7/Sb1QV8KoGOR jkzKM6S4z3U7XlMs3h9ia53fOk7Bl7dHDmOzFfwzT6ar3qvqbvme3xQl/2ESnNfhuMNb vO7LwuvSe1tHfdjHThoaB+VvNEdXvsbioQHz2xhXVORudXsnMDi0zHm/pnRx/Y8pYI/m ZrA5+wO1JDCEi2AzzvxdDI6OqeTCvfW2bknIooyiYXKGEkkMdLD18jW8/ltvNQiiHrWr LEhg== X-Gm-Message-State: AOAM5332ukajcCLv2hucIbQBcwX5pDwIVQ10WfAFA8qAqWi7ebUyYulc UezX5OyYiPpIaLCob9uJR/rdCzqd X-Google-Smtp-Source: ABdhPJxd3xPLEN/0ItYZh4ruC+EQRshvZ0FKOm/o3rtbfw/Z1ZodXsHi7lgO6Nlr7Ha8cU8zQzhd5g== X-Received: by 2002:a17:90a:24ed:: with SMTP id i100mr12910328pje.22.1595726234063; Sat, 25 Jul 2020 18:17:14 -0700 (PDT) Received: from [10.0.9.18] ([111.94.120.161]) by smtp.gmail.com with ESMTPSA id c2sm4483002pgb.52.2020.07.25.18.17.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 25 Jul 2020 18:17:13 -0700 (PDT) Subject: Re: [SOLUTION] Slow or Cannot Connect to PostgreSQL Instance Service on Windows 10 To: Adrian Klaver , Rob Sargent Cc: "pgsql-general@postgresql.org" References: <78b962c2-3f5e-9747-b945-f0899455817f@gmail.com> <53d314b9-a817-f6be-8629-3ae58782e4fe@aklaver.com> <4296F087-4615-47F9-8B28-55F52FEDB861@gmail.com> <5e45e80c-d751-d00c-42a7-6671493b70aa@gmail.com> <14654932-2859-ec62-e6fc-827ac7b5f15f@aklaver.com> From: Surya Widyanto Message-ID: <84744a5f-ff44-b853-a5ee-8ec67affc5cd@gmail.com> Disposition-Notification-To: Surya Widyanto Date: Sun, 26 Jul 2020 08:17:01 +0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <14654932-2859-ec62-e6fc-827ac7b5f15f@aklaver.com> Content-Type: multipart/alternative; boundary="------------B91700DB23889E26831FA8E8" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------B91700DB23889E26831FA8E8 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit On 24-07-2020 06:16, Adrian Klaver wrote: > On 7/22/20 4:49 PM, Surya Widyanto wrote: >> On 23-07-2020 06:12, Rob Sargent wrote: >>> >>> >>>> On Jul 22, 2020, at 4:58 PM, Surya Widyanto >>> > wrote: >>>> >>>> On 23-07-2020 05:26, Adrian Klaver wrote: >>>>> On 7/22/20 10:24 AM, Surya Widyanto wrote: >>>>>> Hi, >>>>>> >>>>>> I have PostgreSQL v12.3 (x64) installed on my Laptop running >>>>>> Windows 10 Home Single Language (64-bit). >>>>>> In two or three times since I fresh install the PostgreSQL and >>>>>> windows on 17-05-2020, 06:04:56 (GMT). >>>>> >>>>> Meant to ask earlier, where did you install Postgres from? >>>>> >>>> I've download the installer executable from >>>> https://www.enterprisedb.com/downloads/postgres-postgresql-downloads, >>>> the Windows x86-64 version. >>>> >>>> Then I've install it on my Windows with binaries path to >>>> *"C:\Program Files\PostgreSQL\12\" *and for data path to >>>> *"H:\PostgreSQL\Data\12.x\"*. >>>> Both *C:* and *H:* drive are partition on my NVMe PCIe Gen. 3 x 4 >>>> SSD Drive mentioned earlier. >>>> >>>> For additional information, I've also install the *PostGIS v3.0 >>>> r15475 (x64)* for *PostgreSQL v12.* >>>> >>>>>> By two or three times I mean, if this slow connection problem >>>>>> happen, than it wil occur in a view days in a row. Then it will >>>>>> return to normal with fast login/connection process. >>>>>> >>>>> >>>>>> Regards, >>>>>> Surya >>>>>> >>>>>> >>> Is there by any chance a correlation between your physical location >>> and the slowness episodes? >>> Any AV software in play? >>> >> >> Since this COVID-19 outbreak, I'm working from home. I've try to use >> different internet connection to test, one with wired connection >> internet provider on my house, and the other are 4G cellular >> connection internet from my smartphone and both internet connection I >> use give the same effect of slow and easy to drop/disconnect >> connection to PostgreSQL. > > I thought you said earlier you where only connecting to the database > on your laptop at localhost?: Yes it is a local connection using TCP on port 5432 using local loopback adapter localhost or IP address 127.0.0.1. > > "The Database is on the same machine/laptop, I try to connect using > localhost and 127.0.0.1, both have the same slow connection problem." > > So Internet connection should not be of concern here or is there more > to this story? Yes, I've also try to disconnect from internet connection, and there is no change on the connection behaviour. It is still slow to connect to the database and easily dropped the connection. > >> For additional information, I've also had this problem when >> connectiong from PHP Application, so that total 4 apps I try to >> connect with PostgreSQL (psql, pgAdmin, Navicat, PHP Application >> Connection) >> I'm not installing any AntiVirus software, the only installed >> AntiVirus software are WIndows Defender that came with Microsoft >> Windows. (Currently I'm Disabling the real time scan on windows >> defender) >> >> After I activate the DEBUG5 for *log_min_messages* and >> *log_min_error_statement*, another line of log came up with the other >> log line I mentioned earlier: >> 2020-07-22 23:31:29.065 +00 [postgres@postgres] - 127.0.0.1(10191) - >> [1724] (psql) LOG:  could not receive data from client: An existing >> connection was forcibly closed by the remote host. >> 2020-07-22 23:31:29.065 +00 [postgres@postgres] - 127.0.0.1(10191) - >> [1724] (psql) DEBUG:  unexpected EOF on client connection >> >> > After so much trial and error I've finally able to solve the problem with my connection to my local PostgreSQL server on my laptop. After I'm managed to fully disable any Windows Defender and Windows Firewall services, I'm now able to connect to my PostgreSQL server quickly and without any dropped connection like before. The error of *DEBUG:  unexpected EOF on client connectio**n *based on my research on the internet are caused by suddenly dropped connection between PostgreSQL client apps with the PostgreSQL serve. and most of the case of dropped connection are caused by some kind of firewall in the system. Thanks to Adrian Klaver and Rob Sargent for giving me insight to solve the problem. Regards, Surya --------------B91700DB23889E26831FA8E8 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: 8bit
On 24-07-2020 06:16, Adrian Klaver wrote:
On 7/22/20 4:49 PM, Surya Widyanto wrote:
On 23-07-2020 06:12, Rob Sargent wrote:


On Jul 22, 2020, at 4:58 PM, Surya Widyanto <ayrus02@gmail.com <mailto:ayrus02@gmail.com>> wrote:

On 23-07-2020 05:26, Adrian Klaver wrote:
On 7/22/20 10:24 AM, Surya Widyanto wrote:
Hi,

I have PostgreSQL v12.3 (x64) installed on my Laptop running Windows 10 Home Single Language (64-bit).
In two or three times since I fresh install the PostgreSQL and windows on 17-05-2020, 06:04:56 (GMT).

Meant to ask earlier, where did you install Postgres from?

I've download the installer executable from https://www.enterprisedb.com/downloads/postgres-postgresql-downloads, the Windows x86-64 version.

Then I've install it on my Windows with binaries path to *"C:\Program Files\PostgreSQL\12\" *and for data path to *"H:\PostgreSQL\Data\12.x\"*.
Both *C:* and *H:* drive are partition on my NVMe PCIe Gen. 3 x 4 SSD Drive mentioned earlier.

For additional information, I've also install the *PostGIS v3.0 r15475 (x64)* for *PostgreSQL v12.*

By two or three times I mean, if this slow connection problem happen, than it wil occur in a view days in a row. Then it will return to normal with fast login/connection process.


Regards,
Surya


Is there by any chance a correlation between your physical location and the slowness episodes?
Any AV software in play?


Since this COVID-19 outbreak, I'm working from home. I've try to use different internet connection to test, one with wired connection internet provider on my house, and the other are 4G cellular connection internet from my smartphone and both internet connection I use give the same effect of slow and easy to drop/disconnect connection to PostgreSQL.

I thought you said earlier you where only connecting to the database on your laptop at localhost?:
Yes it is a local connection using TCP on port 5432 using local loopback adapter localhost or IP address 127.0.0.1.

"The Database is on the same machine/laptop, I try to connect using localhost and 127.0.0.1, both have the same slow connection problem."

So Internet connection should not be of concern here or is there more to this story?
Yes, I've also try to disconnect from internet connection, and there is no change on the connection behaviour. It is still slow to connect to the database and easily dropped the connection.

For additional information, I've also had this problem when connectiong from PHP Application, so that total 4 apps I try to connect with PostgreSQL (psql, pgAdmin, Navicat, PHP Application Connection)
I'm not installing any AntiVirus software, the only installed AntiVirus software are WIndows Defender that came with Microsoft Windows. (Currently I'm Disabling the real time scan on windows defender)

After I activate the DEBUG5 for *log_min_messages* and *log_min_error_statement*, another line of log came up with the other log line I mentioned earlier:
2020-07-22 23:31:29.065 +00 [postgres@postgres] - 127.0.0.1(10191) - [1724] (psql) LOG:  could not receive data from client: An existing connection was forcibly closed by the remote host.
2020-07-22 23:31:29.065 +00 [postgres@postgres] - 127.0.0.1(10191) - [1724] (psql) DEBUG:  unexpected EOF on client connection



After so much trial and error I've finally able to solve the problem with my connection to my local PostgreSQL server on my laptop. After I'm managed to fully disable any Windows Defender and Windows Firewall services, I'm now able to connect to my PostgreSQL server quickly and without any dropped connection like before.
The error of DEBUG:  unexpected EOF on client connection based on my research on the internet are caused by suddenly dropped connection between PostgreSQL client apps with the PostgreSQL serve. and most of the case of dropped connection are caused by some kind of firewall in the system.

Thanks to Adrian Klaver and Rob Sargent for giving me insight to solve the problem.

Regards,
Surya

--------------B91700DB23889E26831FA8E8--