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 1fwSdE-0007CD-DE for pgsql-general@arkaria.postgresql.org; Sun, 02 Sep 2018 13:41:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fwSdB-0006rs-T5 for pgsql-general@arkaria.postgresql.org; Sun, 02 Sep 2018 13:41:33 +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 1fwSdA-0006rl-1T for pgsql-general@lists.postgresql.org; Sun, 02 Sep 2018 13:41:33 +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 1fwSd1-0007hf-7e for pgsql-general@postgresql.org; Sun, 02 Sep 2018 13:41:30 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 3D3FE21C86; Sun, 2 Sep 2018 09:41:22 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sun, 02 Sep 2018 09:41:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= 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=e7V2LvpfQNL+88NobbjAU3rsDyLDu ug7y03LLIjt5fE=; b=PYiixokf5cU0m9qDHVxA8SdjYx7YfophTGmZUWLVF0yi8 8JQttCa3AE9XFsg89MFGzo/WtsomMiknXcNZ5yLxf9TOoagqxCrvQCtJ7Qr9RVTi NI7sBdOinyE9k/RlLxsZMhb5uF4TI+dSPFLNi5x3Qf3HV//1FqgESKUsLawanknA 61b5Wuj2lgOvIvGlrysUls0ymAdTkKjx1LK+viNiyHCvtXCfk/DcB4UlsbqPNc0F 9Qi7fB/q1Kr8ebK48R4L9n6kBc5k+lUI5mKMP8LxeQXNKsHOHLVqcFu6n/1asGgn ihV9ppQrmz3VW0n4trHLQrs751V1TouwjcH7SoLFw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=e7V2Lv pfQNL+88NobbjAU3rsDyLDuug7y03LLIjt5fE=; b=uE/Xl9rMw5A/ay1xFufS5i dErjG8J8je01A+/Fyv8ecbzqTmYLETxne3Gtc3+5Jr4ffLLCYSiHl3dtZ/BbZH30 DcVooeWKRhijPmXnvxOq+C48eOAGYBu0siUCC6phVwWjLiiJr9IjIRS3Qo3N9+XZ CKkFLP78tMdqmcxV3MjJ82mVJGmQOWMWQsN/V6smGRZmaIw+KNRCs7tJ7veSqqyi /DadZYxFiSqPyqH0Om+eilVYlKkASuoMUQ+prTXuzz2CnDw7usH8lFfLwYigD/X3 K+W2yVQzWxwAcHsMCHG/eBrHItVKnbIvmvIwf0XFVoioRFGj4bW4g3NvdrP+s7Fg == 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 3E3BEE405E; Sun, 2 Sep 2018 09:41:21 -0400 (EDT) Subject: Re: pg_basebackup: could not receive data from WAL stream To: greigwise , pgsql-general@postgresql.org References: <1535861193579-0.post@n3.nabble.com> From: Adrian Klaver Message-ID: <572baa61-2a05-109d-e887-f02b0e076ada@aklaver.com> Date: Sun, 2 Sep 2018 06:41:19 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <1535861193579-0.post@n3.nabble.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 09/01/2018 09:06 PM, greigwise wrote: > Hello. > > On postgresql 10.5, my pg_basebackup is failing with this error: > > pg_basebackup: could not receive data from WAL stream: server closed the > connection unexpectedly > This probably means the server terminated abnormally > before or while processing the request > > In the postgres log files, I'm seeing: > > 2018-09-02 00:57:32 UTC bkp_user 5b8b278c.11c3f [unknown] LOG: terminating > walsender process due to replication timeout > > I'm running the following command right on the database server itself: > > pg_basebackup -U repl -D /var/tmp/pg_basebackup_20180901 -Ft -z > > It seems to be an intermittent problem.. I've had it fail or succeed about > 50/50. I even bumped up the wal_sender_timeout to 2000. One notable thing > is that I'm running on an ec2 instance on AWS. The unit for wal_sender_timeout is ms so the above is 2 seconds whereas the default value is 60 seconds(60s in postgresql.conf file). See below for setting units in file: https://www.postgresql.org/docs/10/static/config-setting.html Also what is your max_wal_senders setting? > > Any advice would be helpful. > > Greig Wise > > > > -- > Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html > > -- Adrian Klaver adrian.klaver@aklaver.com