Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g1vj3-0001HY-Jf for pgsql-general@arkaria.postgresql.org; Mon, 17 Sep 2018 15:46:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g1vj1-0002LY-6r for pgsql-general@arkaria.postgresql.org; Mon, 17 Sep 2018 15:46:11 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g1vj0-0002LN-Rl for pgsql-general@lists.postgresql.org; Mon, 17 Sep 2018 15:46:11 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g1viw-00073Z-Um for pgsql-general@postgresql.org; Mon, 17 Sep 2018 15:46:09 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id D23C321193; Mon, 17 Sep 2018 11:46:05 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Mon, 17 Sep 2018 11:46:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=OVwlHWe5LS1QEFmreZGKTsIgvr8Pr 67RvO0WkBmBUCM=; b=Dy5OBiLWuXASNs4ZTZV3up5C0gaR3hq+6uhUhTgsmAp2x ktQs5VgMQDMYq6u121zatRhljf1nmuTPcri4ffkuorFYnQYiy5X/tgYWKmgtsGfO e7s7v2P1/HVVRmSrRr9Br0WqY7INHy9DDscAzGt/4ajYjLzTgUefpr23SFH6cg0i gHkHMQwrAEYfH9iZfI3PLAc6zPSRZAnBcIQx1RptohDYWQjVMNXAh82b5S+jECxf TDyixaHlWeAqZAbkKbHbBJUZ10Lcyfl7+1A5vmJLuSYk7+ZJBd8cwbMpVNQ12jJr qr/7KAeMj4WMod7xqDr5FYBCZx2yCFAO2EanNnCDQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=OVwlHW e5LS1QEFmreZGKTsIgvr8Pr67RvO0WkBmBUCM=; b=jPWwbshEBA0TDCy2Ol/Vj7 J502V5tCiKVfoFIu6VTqI+vNF7ssXzetWgcPOY2qzZnft/09X8cgNPlntxnmVnwx HFXKz2fQIW4kDney4sd6ODZRIGnqSP4ml3I592COpRpqbIIidMgLMfaHXnxvPQal /V/TmJToIAs+7qpGNqri/wNQTx3ryRc8FhehXiufqKnJmdx+aXhQYuHDqD4IIPsp R1GQ6Uf1vGw4n9aI7IULjW5qeiFWUa3sTOSUjg4DZhGaGSF8vkRKq30aNLFPM4RQ vSv1b25b1V9saEC7SlVuIqzGuE0/1Dvl+HQlANn+A6CKR1jmEMBzYdoILNKbIkBg == X-ME-Proxy: X-ME-Sender: Received: from [192.168.1.3] (unknown [71.212.134.3]) by mail.messagingengine.com (Postfix) with ESMTPA id B029FE454E; Mon, 17 Sep 2018 11:46:04 -0400 (EDT) Subject: Re: Pgbouncer and postgres To: Nicola Contu References: <7bceb23a-8724-7fd9-bf74-e5dfd557283e@aklaver.com> <6d2f155c-4bd4-14d8-bbf2-506617c9462a@aklaver.com> <335c53c9-f603-090e-8dbd-8a41cd285e68@aklaver.com> Cc: pgsql-general From: Adrian Klaver Message-ID: <76637bc1-65c0-8a73-743e-e5a2d40265f1@aklaver.com> Date: Mon, 17 Sep 2018 08:46:03 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 9/17/18 8:39 AM, Nicola Contu wrote: Please reply to list also. Ccing list. > No wait, IP_ADDR has been modified by me, but there is the IP of the > machine 10.151.x. To be clear in your posts you are replacing the actual IP with IP_ADDR, correct? > > > Here is the psql command . > > [root@cmd-dev1 ~]# psql -U ncontu -p 6543 cmd3dev > psql: server closed the connection unexpectedly > This probably means the server terminated abnormally > before or while processing the request. So what does the pgbouncer log show when you do above? > > > > > Il giorno lun 17 set 2018 alle ore 17:35 Adrian Klaver > > ha scritto: > > On 9/17/18 7:26 AM, Nicola Contu wrote: > > [Mon Sep 17 10:24:59.041589 2018] [php7:notice] [pid 63893:tid > > 140586929567488] [client 10.160.41.3:51764 > ] > > PHP WARNING: pg_connect(): Unable to connect to PostgreSQL > server: could > > not connect to server: Connection refused\n\tIs the server > running on > > host "IP_ADDR" and accepting\n\tTCP/IP connections on port > > 6543? in /home/cmd3/adodb5/drivers/adodb-postgres64.inc.php on > line 727 > > To me it looks like IP_ADDR is not resolving to a host. > > In your pgbouncer.ini I see: > > DB_NAME = host=IP_ADDD port=5432 dbname=DB_NAME auth_user=pgbouncer > pool_size=120 > > but the error is about connecting to port 6543 which is your pgbouncer > 'server'. > > Are you sure your connection string is pointing at the correct thing? > > > > > So basically the same I get when connecting via psql on port 6543 > > What is the full psql command? > > > > > Il giorno lun 17 set 2018 alle ore 16:23 Adrian Klaver > > > >> ha scritto: > > > >     On 9/17/18 7:19 AM, Nicola Contu wrote: > >      > I'm not aware of any update installed. There were like 600+ > >     updates in fact. > >      > > >      > These are the logs when connecting via telnet : > > > >     How about those from when Apache tries to connect and > pgbouncer crashes? > > > >      > Connection closed by foreign host. > > > > > >     -- > >     Adrian Klaver > > adrian.klaver@aklaver.com > > > > > > > -- > Adrian Klaver > adrian.klaver@aklaver.com > -- Adrian Klaver adrian.klaver@aklaver.com