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 1jyMWh-000484-9o for pgsql-general@arkaria.postgresql.org; Wed, 22 Jul 2020 21:43:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jyMWg-0005li-46 for pgsql-general@arkaria.postgresql.org; Wed, 22 Jul 2020 21:43:46 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jyMWf-0005la-Ot for pgsql-general@lists.postgresql.org; Wed, 22 Jul 2020 21:43:45 +0000 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jyMWc-00005T-RM for pgsql-general@postgresql.org; Wed, 22 Jul 2020 21:43:45 +0000 Received: by mail-pl1-x644.google.com with SMTP id x9so1636636plr.2 for ; Wed, 22 Jul 2020 14:43:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:disposition-notification-to :date:user-agent:mime-version:in-reply-to:content-language; bh=Zu9FcU1RorfEK/kICypJaAsoWaAs0+69tSa64aH194g=; b=NsdvakVy/anlUpW3nNfkxnid9urnNK93Q7f1OiMa19j6+nhJTg1KqCZEt5o7fdq9E7 AT3R0ttoNXqcqQWeOX/a9909HOOzbymNOGe4XwkEyVpN4n+XzQ0Bjf196U1VT0SBNWdI c0gsUIzxsCrzu/RNmNRKVhumkK1UxUDNpv/k86esTEyLceyA7tGL+t+oeElgFndWwbri 8wz6Rso+RsOzMbT2tQXUw8TP062sC/NggYeDbrfN/kcJIu2upDq1RVvJnWH3mpPZ2vkd 0nFQyyECyaRd4CnRHpc7SASK27tIQEAshy1mwJjdxgTMxOtCEoCFEageRjHJ5Z8yqXd5 nXSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id :disposition-notification-to:date:user-agent:mime-version :in-reply-to:content-language; bh=Zu9FcU1RorfEK/kICypJaAsoWaAs0+69tSa64aH194g=; b=UAGZujQ22WItWmWGj1B41ML4XzCd94R6j2eIOy2thoZZ/hsfbJl2P6UEch/o2/yxwt TV6F5ag2JEhlc/3QlLjSuGVmXuY4xMvVng/63VgUo30HRzFIGUhtibN5JbsIAaUB0At9 os3qjqZ0kCT1G210LEvC5/cjt+PmQYcWLbpGlgylzKdl4e+/O2CimM+5LurzqIGIDZpZ KFjEx66YCw6jp1RysO1IiuLpVXVJGsbA7v1g9UvWfR7RQSlAhoWX2vL9IjWfqg7HdddO CcXckFaoEbB/isvQUDfdGOay0+v401FDbfb/wLi30TNXSdf4TtvsoF5WESB3CciZ1AId V50Q== X-Gm-Message-State: AOAM5310x22z3v4AKJaZQL0URw6XgJ+cihmmQPGBD6XrgsoJYvQbZO1F /5AYvMef9VEfz1VB+ME3px+ytHmz X-Google-Smtp-Source: ABdhPJz9gs3CXrtf8cGf4r0eQlSUxwB9RFCvFnIiG9yU2SCG2+Q2CHtRDgdIyl3XRmwIhv/0zrYNOw== X-Received: by 2002:a17:90a:ff03:: with SMTP id ce3mr1377693pjb.174.1595454219950; Wed, 22 Jul 2020 14:43:39 -0700 (PDT) Received: from [10.0.9.18] ([118.137.79.174]) by smtp.gmail.com with ESMTPSA id c14sm592063pgb.1.2020.07.22.14.43.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 Jul 2020 14:43:38 -0700 (PDT) Subject: Re: Slow or Cannot Connect to PostgreSQL Instance Service on Windows 10 To: Adrian Klaver , pgsql-general@postgresql.org References: <78b962c2-3f5e-9747-b945-f0899455817f@gmail.com> <935a008f-7804-f419-85b1-776800b37a04@aklaver.com> From: Surya Widyanto Message-ID: <35a72d52-12b0-0371-f6a1-9bb722716de6@gmail.com> Disposition-Notification-To: Surya Widyanto Date: Thu, 23 Jul 2020 04:43:35 +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: <935a008f-7804-f419-85b1-776800b37a04@aklaver.com> Content-Type: multipart/alternative; boundary="------------957A842D1EFAFAE3AB0A021C" 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. --------------957A842D1EFAFAE3AB0A021C Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 23-07-2020 02:07, 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). >> 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. >> >> I've try to restart the laptop, restart the service but nothing give >> the sign to improve the slow login/connection process. >> >> I've also try to turn off the *log_hostname* config in >> *postgresql.conf* and try to turn off the *Windows Firewall, Windows >> Defender Real-Time Scanner* but nothing works to improve the slow >> login connection. >> >> I've also try to check the Postgres Log file but not much error shows >> in the log except for this error that appears a few time: >> 2020-07-22 14:43:22.312 +00 [13740] LOG:  could not receive data from >> client: An existing connection was forcibly closed by the remote host. > > Is the database server you are connecting to on the laptop or some > other machine? > 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. > Where is this Postgres log? > The path of the log is on *\log\postgresql-%Y-%m-%d_%H%M%S.log* Is there any config that I can change to get more verbose log information to trace and debug the connection problem? >> >> This problem happens with all of the application such as *psql*, >> *pgAdmin*, *Navicat*, all with the same symptoms of slow >> login/connection to my PostgreSQL v12.3 (x64) service and if >> connected, then it will be easy to disconnected. >> >> If needed my laptop specs are: >> >>   * Intel Core i7-9750H >>   * 16GB of RAM >>   * Samsung SSD 970 EVO Plus 2TB >> >> Is database size can affect this connection time required to start a >> database session? > > No, a connection does not read the entire database. > >> FYI one of my database has size of 209GB, but currently I'm not using >> or connect to that database. >> >> Thanks in advance. >> >> Regards, >> Surya >> >> > > --------------957A842D1EFAFAE3AB0A021C Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit
On 23-07-2020 02:07, 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).
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.

I've try to restart the laptop, restart the service but nothing give the sign to improve the slow login/connection process.

I've also try to turn off the *log_hostname* config in *postgresql.conf* and try to turn off the *Windows Firewall, Windows Defender Real-Time Scanner* but nothing works to improve the slow login connection.

I've also try to check the Postgres Log file but not much error shows in the log except for this error that appears a few time:
2020-07-22 14:43:22.312 +00 [13740] LOG:  could not receive data from client: An existing connection was forcibly closed by the remote host.

Is the database server you are connecting to on the laptop or some other machine?

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.
Where is this Postgres log?

The path of the log is on <data_directory>\log\postgresql-%Y-%m-%d_%H%M%S.log
Is there any config that I can change to get more verbose log information to trace and debug the connection problem?

This problem happens with all of the application such as *psql*, *pgAdmin*, *Navicat*, all with the same symptoms of slow login/connection to my PostgreSQL v12.3 (x64) service and if connected, then it will be easy to disconnected.

If needed my laptop specs are:

  * Intel Core i7-9750H
  * 16GB of RAM
  * Samsung SSD 970 EVO Plus 2TB

Is database size can affect this connection time required to start a database session?

No, a connection does not read the entire database.

FYI one of my database has size of 209GB, but currently I'm not using or connect to that database.

Thanks in advance.

Regards,
Surya





--------------957A842D1EFAFAE3AB0A021C--