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 1nOo8m-00086C-Ls for pgsql-performance@arkaria.postgresql.org; Mon, 28 Feb 2022 22:05:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nOo8l-0002Aw-LC for pgsql-performance@arkaria.postgresql.org; Mon, 28 Feb 2022 22:05:11 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nOo8l-0002Am-7O for pgsql-performance@lists.postgresql.org; Mon, 28 Feb 2022 22:05:11 +0000 Received: from mail-io1-xd34.google.com ([2607:f8b0:4864:20::d34]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nOo8h-0006uc-Ce for pgsql-performance@postgresql.org; Mon, 28 Feb 2022 22:05:10 +0000 Received: by mail-io1-xd34.google.com with SMTP id d19so16392685ioc.8 for ; Mon, 28 Feb 2022 14:05:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=/iNaoNADnuPbM5p6Z4GOgaNqn/nV9Q2xRljLO7iWTrI=; b=atBoSI+WQcPmzPYZnxTXDJvC1ok6zVlCfEc7bKAcJ9pmtYzB9VJCDml2a6sDaoT/ut SsUX1INfukhfzhI9NAgTJlodcHJ3oEstPJB2i7LUVhnWVEVCQ5xX4vysOzAkQLGeBo4Q rHGFeaMYZu2pXRvFF3CB+8kp1gN9IRWIsDnzCcjGS0sqQEyJzsDY3ShYlySLcYA4KBrz x5kOLWbVlpc42yWoiq4rSpe39D7AlRngEZwVsBej/W7G69zQTYROh9Tkii9frcRxXCdY xrTOp8JQV7KYNEMYnQ5tu7Oy59h9O3UY64HyAx3RLQXkRxr/apERNfB2GYM9xHwmgZOK 5xVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=/iNaoNADnuPbM5p6Z4GOgaNqn/nV9Q2xRljLO7iWTrI=; b=P1Zfc+Y8qHRgXT3I0SpNulpNxjV4Xd3Pc7dHDyf7E1d6KfkkoFNdEWaekIE+w7u0t6 M7+E5nbY9nAkqQ53QR5lRRt/AFIQb758VEzHdnsxPcpkEMKsP5dJUJqYd61dO2EpN/U8 M9kjAzQLgHLAIBz1MgEV7Kr5oImhHc6rP+Zxydo2dTJekuP49cQo1bMnAEGoPRB417uN YZzMta1JSGZADkqBPJc6zijQKexSJJTuhZRctGS4XVo1mEnumLx13RuS+GZx4KWP+bN8 qWfMvV31n5CqS6LFDGMRt0QEj83tgroU5ycPuuVnOMP5wKfc90hHF9CXOS8/fXgYluB+ xSyA== X-Gm-Message-State: AOAM5301qb1lhM9b2P/oEixlBBucWhTthG0d9VECJLE3p0do5/H6GnqF t6baRsQoaqN6BApp6/Z7e3fWYQ== X-Google-Smtp-Source: ABdhPJzQWoyCtrk9oWTSogclZhZLwd7Ek5fE4vIRUEZX0EeXsqrI6hREhmn1Y167yGN/NSLrDzstXQ== X-Received: by 2002:a5d:9651:0:b0:641:6371:fb77 with SMTP id d17-20020a5d9651000000b006416371fb77mr16930763ios.99.1646085905960; Mon, 28 Feb 2022 14:05:05 -0800 (PST) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id z15-20020a921a4f000000b002bf46092183sm6940007ill.76.2022.02.28.14.05.05 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Feb 2022 14:05:05 -0800 (PST) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id CA2FF8004DF; Mon, 28 Feb 2022 16:05:03 -0600 (CST) Date: Mon, 28 Feb 2022 16:05:03 -0600 From: Justin Pryzby To: ldh@laurent-hasson.com Cc: pgsql-performance@postgresql.org Subject: Re: An I/O error occurred while sending to the backend (PG 13.4) Message-ID: <20220228220503.GF25269@telsasoft.com> References: <20220224020005.GT9008@telsasoft.com> <20220225130213.GB9008@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Feb 28, 2022 at 09:43:09PM +0000, ldh@laurent-hasson.com wrote: > On Wed, Feb 23, 2022 at 07:04:15PM -0600, Justin Pryzby wrote: > > > And the aforementioned network trace. You could set a capture filter on TCP > > > SYN|RST so it's not absurdly large. From my notes, it might look like this: > > > (tcp[tcpflags]&(tcp-rst|tcp-syn|tcp-fin)!=0) > > > > I'd also add '|| icmp'. My hunch is that you'll see some ICMP (not "ping") > > being sent by an intermediate gateway, resulting in the connection being > > reset. > > I am so sorry but I do not understand what you are asking me to do. I am unfamiliar with these commands. Is this a postgres configuration file? Is this something I just do once or something I leave on to hopefully catch it when the issue occurs? Is this something to do on the DB machine or the ETL machine? FYI: It's no problem. I suggest that you run wireshark with a capture filter to try to show *why* the connections are failing. I think the capture filter might look like: (icmp || (tcp[tcpflags] & (tcp-rst|tcp-syn|tcp-fin)!=0)) && host 10.64.17.211 With the "host" filtering for the IP address of the *remote* machine. You could run that on whichever machine is more convenient and leave it running for however long it takes for that error to happen. You'll be able to save a .pcap file for inspection. I suppose it'll show either a TCP RST or an ICMP. Whichever side sent that is where the problem is. I still suspect the issue isn't in postgres. > - My ETL machine is on 10.64.17.211 > - My DB machine is on 10.64.17.210 > - Both on Windows Server 2012 R2, x64 These network details make my theory unlikely. They're on the same subnet with no intermediate gateways, and communicate directly via a hub/switch/crossover cable. If that's true, then both will have each other's hardware address in ARP after pinging from one to the other. -- Justin