Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gQ9ME-00023u-GT for pgsql-admin@arkaria.postgresql.org; Fri, 23 Nov 2018 11:10:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gQ9MC-0002M9-Ok for pgsql-admin@arkaria.postgresql.org; Fri, 23 Nov 2018 11:10:44 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1gQ9MC-0002Li-Gy for pgsql-admin@lists.postgresql.org; Fri, 23 Nov 2018 11:10:44 +0000 Received: from mail-qk1-x741.google.com ([2607:f8b0:4864:20::741]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gQ9M5-0003tO-2c for pgsql-admin@lists.postgresql.org; Fri, 23 Nov 2018 11:10:44 +0000 Received: by mail-qk1-x741.google.com with SMTP id y16so8265124qki.7 for ; Fri, 23 Nov 2018 03:10:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=qo4JgWMQyd6JDBFEU8Vm/WSvLZ95DJAnOyAa4cMXI4M=; b=YeDP/s2296T3NxbFy5BM1O+OuSL8PKyeRU8+P+BvPh0QN21+oVyVh3x+otnUvbJyWL J0R8P6DfLX9OvfVqNtCrzbZ+SFiGCMBHhtwoWxGHfxnvyqKQEXe6Xf85MU4Ih/srmlVJ FlcWzRDlNKVUY0mll/NNpNr1o7MuDfVAFGqEJHByScuKFnY3eEPlBJ8aySA3vG/IIHun 0rOEEWQLCbeTzunR7JfeMDVxDynAmjuP041bNWxvRk3M8KIS+Xpjdal60PsAJmUjqhcX oKFaIUQumiAS1mEBtDAiNpSEA9SwCYIeU79rnDcsDeAwmLfHVG2I2pL7EPWvBsPYz0Pq JnPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=qo4JgWMQyd6JDBFEU8Vm/WSvLZ95DJAnOyAa4cMXI4M=; b=Fy+ESc179BlCys+TjaMr2cwR7SdgfMju4ChiFqbM27WW5SGNdnj2660srY49am3A0I KU9SUdLKPALXoCeFXVJeV2fC1jis6S322W6tIwR44kJA5pgJVX0IBQDCTsMD96L0DqA6 Y8z0A8nWykyD1qbFMuLw+UxhCpTUp9j8G5xK1TwerRn1wtzb+DCQkyJ/aIk7jXhclSa0 4bn0x4Q8EbL6P2M8RT1WXKNRNGnbOTmoPANBSwL+wowSsoWu7Eu3LKLMszmUdWvaQ/pe gfEe5Gaeh5n5QI/rSZ+VjL+KUzq4pHYPyxrGVlJTMp4wyvyGmvLEobWw7rQBr70wvrNJ 7jWA== X-Gm-Message-State: AA+aEWYxJUxR/f7WuDTDP20uiLCY4QDwmJR+dVcxTRQrMMjzsypiAqvq budA5KIN4N609L7GITywWdAGJN+kweY= X-Google-Smtp-Source: AFSGD/Udz9RcCg8Y6+7s7iMkby1xHYiW0C6c00MilhXIUhCwBKkVMKRprPtbGsKNffFnco2e1UetXQ== X-Received: by 2002:a37:9b82:: with SMTP id d124mr12783488qke.172.1542971434843; Fri, 23 Nov 2018 03:10:34 -0800 (PST) Received: from alvin.alvh.no-ip.org ([201.186.80.75]) by smtp.gmail.com with ESMTPSA id v57sm31600056qtv.80.2018.11.23.03.10.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 23 Nov 2018 03:10:28 -0800 (PST) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 5B11D5E9; Fri, 23 Nov 2018 08:10:24 -0300 (-03) Date: Fri, 23 Nov 2018 08:10:24 -0300 From: Alvaro Herrera To: Rui DeSousa Cc: Achilleas Mantzios , pgsql-admin@lists.postgresql.org Subject: Re: PostgreSQL 10.5 : Logical replication timeout results in PANIC in pg_wal "No space left on device" Message-ID: <20181123111024.73ck7f7zbzexfudz@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <946FBD41-7BAF-4414-8FB9-C0F16A0680F6@crazybean.net> User-Agent: NeoMutt/20180716 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2018-Nov-14, Rui DeSousa wrote: > > On Nov 14, 2018, at 3:31 AM, Achilleas Mantzios wrote: > > > > Our sysadms (seasoned linux/network guys : we have been working here > > for more than 10 yrs) were absolute in that we run no firewall or > > other traffic shaping system between the two hosts. (if we did the > > problem would manifest itself earlier). Can you recommend what to > > look for exactly regarding both TCP stacks ? The subscriber node is > > a clone of the primary. We have : > > > > # sysctl -a | grep -i keepaliv > > net.ipv4.tcp_keepalive_intvl = 75 > > net.ipv4.tcp_keepalive_probes = 9 > > net.ipv4.tcp_keepalive_time = 7200 > > Those keep alive settings are linux’s defaults and work out to be 18 > hours before the abandon connection is dropped. So, the WAL receiver > should have corrected itself after that time. For reference, I run > terminating abandon session within 15 mins as they take-up valuable > database resources and could potentially hold on to locks, snapshots, > etc. Where does your 18h figure come from? As I understand it, these numbers mean "wait 7200 seconds, then send 9 probes 75 seconds apart", kill the connection if not reply is obtained. So that works out to about 131 minutes (modulo fencepost bug). Certainly not 18 hours ... Now ... I have seen Linux kernel code that seemed to me to cause network transmission get stuck *in the kernel* without any way out. Now I'm not a kernel expert and I don't know if this applies to your case (maybe it got fixed already), but it was definitely some process that was stuck with "wchan" set to a network kernel call and way beyond TCP keepalives. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services