[prev in list] [next in list] [prev in thread] [next in thread]
List: postgresql-general
Subject: Re: [SOLUTION] Slow or Cannot Connect to PostgreSQL Instance Service on Windows 10
From: Surya Widyanto <ayrus02 () gmail ! com>
Date: 2020-07-26 1:17:01
Message-ID: 84744a5f-ff44-b853-a5ee-8ec67affc5cd () gmail ! com
[Download RAW message or body]
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 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
[Attachment #3 (text/html)]
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body>
<div class="moz-cite-prefix">On 24-07-2020 06:16, Adrian Klaver
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:14654932-2859-ec62-e6fc-827ac7b5f15f@aklaver.com">On
7/22/20 4:49 PM, Surya Widyanto wrote:
<br>
<blockquote type="cite">On 23-07-2020 06:12, Rob Sargent wrote:
<br>
<blockquote type="cite">
<br>
<br>
<blockquote type="cite">On Jul 22, 2020, at 4:58 PM, Surya
Widyanto <<a class="moz-txt-link-abbreviated" \
href="mailto:ayrus02@gmail.com">ayrus02@gmail.com</a>
<a class="moz-txt-link-rfc2396E" \
href="mailto:ayrus02@gmail.com"><mailto:ayrus02@gmail.com></a>> wrote: <br>
<br>
On 23-07-2020 05:26, Adrian Klaver wrote:
<br>
<blockquote type="cite">On 7/22/20 10:24 AM, Surya Widyanto
wrote:
<br>
<blockquote type="cite">Hi,
<br>
<br>
I have PostgreSQL v12.3 (x64) installed on my Laptop
running Windows 10 Home Single Language (64-bit).
<br>
In two or three times since I fresh install the
PostgreSQL and windows on 17-05-2020, 06:04:56 (GMT).
<br>
</blockquote>
<br>
Meant to ask earlier, where did you install Postgres from?
<br>
<br>
</blockquote>
I've download the installer executable from
<a class="moz-txt-link-freetext" \
href="https://www.enterprisedb.com/downloads/postgres-postgresql-downloads">https://www.enterprisedb.com/downloads/postgres-postgresql-downloads</a>,
the Windows x86-64 version.
<br>
<br>
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\"*.
<br>
Both *C:* and *H:* drive are partition on my NVMe PCIe Gen.
3 x 4 SSD Drive mentioned earlier.
<br>
<br>
For additional information, I've also install the *PostGIS
v3.0 r15475 (x64)* for *PostgreSQL v12.*
<br>
<br>
<blockquote type="cite">
<blockquote type="cite">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.
<br>
<br>
</blockquote>
<br>
<blockquote type="cite">Regards,
<br>
Surya
<br>
<br>
<br>
</blockquote>
</blockquote>
</blockquote>
Is there by any chance a correlation between your physical
location and the slowness episodes?
<br>
Any AV software in play?
<br>
<br>
</blockquote>
<br>
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.
<br>
</blockquote>
<br>
I thought you said earlier you where only connecting to the
database on your laptop at localhost?:
<br>
</blockquote>
Yes it is a local connection using TCP on port 5432 using local
loopback adapter localhost or IP address 127.0.0.1.<br>
<blockquote type="cite"
cite="mid:14654932-2859-ec62-e6fc-827ac7b5f15f@aklaver.com">
<br>
"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."
<br>
<br>
So Internet connection should not be of concern here or is there
more to this story?
<br>
</blockquote>
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.<br>
<blockquote type="cite"
cite="mid:14654932-2859-ec62-e6fc-827ac7b5f15f@aklaver.com">
<br>
<blockquote type="cite">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)
<br>
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)
<br>
<br>
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:
<br>
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.
<br>
2020-07-22 23:31:29.065 +00 [postgres@postgres] -
127.0.0.1(10191) - [1724] (psql) DEBUG: unexpected EOF on
client connection
<br>
<br>
<br>
</blockquote>
<br>
</blockquote>
<p>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.<br>
The error of <b>DEBUG: unexpected EOF on client connectio</b><b>n
</b>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.<br>
<br>
Thanks to Adrian Klaver and Rob Sargent for giving me insight to
solve the problem.</p>
<p>Regards,<br>
Surya<br>
</p>
</body>
</html>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic