Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cX3iz-0008EO-Tw for pgsql-admin@arkaria.postgresql.org; Fri, 27 Jan 2017 10:25:46 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cX3iz-00079W-CQ for pgsql-admin@arkaria.postgresql.org; Fri, 27 Jan 2017 10:25:45 +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_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cX3hH-0005C9-SP for pgsql-admin@postgresql.org; Fri, 27 Jan 2017 10:23:59 +0000 Received: from mta09.3.doruk.net.tr ([212.58.5.122] helo=mta09.doruk.net.tr) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cX3hE-00016X-2i for pgsql-admin@postgresql.org; Fri, 27 Jan 2017 10:23:59 +0000 Received: from cmail19.webkontrol.doruk.net.tr ([212.58.6.99]) by mta09.doruk.net.tr with esmtp (Exim 4.86) (envelope-from ) id 1cX3ga-000784-5K for pgsql-admin@postgresql.org; Fri, 27 Jan 2017 13:23:16 +0300 Received: from DESKTOPM80CG12 ([82.222.117.36]) by cmail19.webkontrol.doruk.net.tr (IceWarp 11.1.2.0) with ASMTP id 201701271325532568 for ; Fri, 27 Jan 2017 13:25:53 +0300 From: =?iso-8859-9?B?RXJ0YW4gS/zn/Gtv8Gx1?= To: Subject: Failed to set up event for socket: error code 10038 Date: Fri, 27 Jan 2017 13:23:49 +0300 Message-ID: <007601d27887$736d80c0$5a488240$@1nar.com.tr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-9" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 16.0 Thread-Index: AdJ4hw8vOWjlN2dpTJ+lI6RW/+HhRA== Content-Language: tr X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org Hi, Using PostgreSQL 9.6.1, compiled by Visual C++ build 1800, 64-bit on a Laptop running Windows 10 64bit OS with pro series SSD and 8GB RAM. Setup is fetched from EnterpriseDB. I am a software developer and this is a system is only used by me. Goolge searches were not helpful for the log message I receive. I have below postgresql.conf parameters (only listing some of them): max_connections =3D 100 shared_buffers =3D 512MB work_mem =3D 87381kB maintenance_work_mem =3D 512MB dynamic_shared_memory_type =3D Windows wal_buffers =3D 16MB max_wal_size =3D 100MB min_wal_size =3D 100MB checkpoint_completion_target =3D 0.5 effective_cache_size =3D 2GB default_statistics_target =3D 100 When establishing a connection to the database, I frequently get error messages in my application log saying: 2017-01-27 12:47:41.908 *** (10054) Error on data reading from the connection: An existing connection was forcibly closed by the remote host. Socket Error Code: 10054($2746) I read a FATAL marked line in postgresql log file at exact same second: 2017-01-27 12:47:41 +03 FATAL: failed to set up event for socket: error code 10038 Application is self-closing upon receiving such error. I instantly re-run it (to continue my code tests) and sometimes it is 3-4 times until I can get my application running. I am using latest version of Devart Universal Database Access Components (UniDAC) for performing database operations. As far as I know, these components make direct connection to PostgreSQL. Nothing in between like ODBC or anything. If that is relevant. When I was investigating my problem, I also read following lines in the postgresql log file: 2017-01-27 12:22:34 +03 LOG: using stale statistics instead of current ones because stats collector is not responding 2017-01-27 12:27:35 +03 LOG: using stale statistics instead of current ones because stats collector is not responding 2017-01-27 12:29:51 +03 LOG: using stale statistics instead of current ones because stats collector is not responding 2017-01-27 12:30:51 +03 LOG: using stale statistics instead of current ones because stats collector is not responding 2017-01-27 12:32:35 +03 LOG: using stale statistics instead of current ones because stats collector is not responding My questions are: 1- I understand that PostgreSQL is closing the connection. What may cause for such a connection error, and how to solve it? 2- These "stale statistics" messages in log file, are they anything important? Is there a way to stop them being logged because they seem to grow log file. Thanks. Ertan K=FC=E7=FCko=F0lu --=20 Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin