TCP connection failed while receiving payload length from upstream

I have since recently the following eerors in FTL.log:

ubuntu@odroid:/var/log/pihole$ sudo grep payload FTL.log pihole.log
FTL.log:2025-02-13 10:53:33.715 CET [72094/F36170] WARNING: Connection error (127.0.0.1#5335): TCP connection failed while receiving payload length from upstream (Connection prematurely closed by remote server)
FTL.log:2025-02-13 10:59:56.091 CET [72209/F36170] WARNING: Connection error (127.0.0.1#5335): TCP connection failed while receiving payload length from upstream (Connection prematurely closed by remote server)
FTL.log:2025-02-13 11:08:06.074 CET [72336/F36170] WARNING: Connection error (127.0.0.1#5335): TCP connection failed while receiving payload length from upstream (Connection prematurely closed by remote server)
FTL.log:2025-02-13 11:10:57.522 CET [72388/F36170] WARNING: Connection error (127.0.0.1#5335): TCP connection failed while receiving payload length from upstream (Connection prematurely closed by remote server)
FTL.log:2025-02-13 11:10:57.630 CET [72390/F36170] WARNING: Connection error (127.0.0.1#5335): TCP connection failed while receiving payload length from upstream (Connection prematurely closed by remote server)
FTL.log:2025-02-13 11:15:19.815 CET [72452/F36170] WARNING: Connection error (127.0.0.1#5335): TCP connection failed while receiving payload length from upstream (Connection prematurely closed by remote server)
FTL.log:2025-02-13 11:15:19.914 CET [72451/F36170] WARNING: Connection error (127.0.0.1#5335): TCP connection failed while receiving payload length from upstream (Connection prematurely closed by remote server)
FTL.log:2025-02-13 11:19:38.384 CET [73038/F36170] WARNING: Connection error (127.0.0.1#5335): TCP connection failed while receiving payload length from upstream (Connection prematurely closed by remote server)
FTL.log:2025-02-13 11:19:38.384 CET [73037/F36170] WARNING: Connection error (127.0.0.1#5335): TCP connection failed while receiving payload length from upstream (Connection prematurely closed by remote server)
FTL.log:2025-02-13 11:39:49.997 CET [73605/F36170] WARNING: Connection error (127.0.0.1#5335): TCP connection failed while receiving payload length from upstream (Connection prematurely closed by remote server)
FTL.log:2025-02-13 12:08:03.073 CET [74059/F36170] WARNING: Connection error (127.0.0.1#5335): TCP connection failed while receiving payload length from upstream (Connection prematurely closed by remote server)
FTL.log:2025-02-13 12:08:03.078 CET [74060/F36170] WARNING: Connection error (127.0.0.1#5335): TCP connection failed while receiving payload length from upstream (Connection prematurely closed by remote server)
FTL.log:2025-02-13 12:08:03.315 CET [74062/F36170] WARNING: Connection error (127.0.0.1#5335): TCP connection failed while receiving payload length from upstream (Connection prematurely closed by remote server)
FTL.log:2025-02-13 12:08:03.319 CET [74063/F36170] WARNING: Connection error (127.0.0.1#5335): TCP connection failed while receiving payload length from upstream (Connection prematurely closed by remote server)
FTL.log:2025-02-13 12:08:03.347 CET [74065/F36170] WARNING: Connection error (127.0.0.1#5335): TCP connection failed while receiving payload length from upstream (Connection prematurely closed by remote server)
FTL.log:2025-02-13 12:28:43.787 CET [74187/F36170] WARNING: Connection error (127.0.0.1#5335): TCP connection failed while receiving payload length from upstream (Connection prematurely closed by remote server)
FTL.log:2025-02-13 13:08:56.418 CET [74456/F36170] WARNING: Connection error (127.0.0.1#5335): TCP connection failed while receiving payload length from upstream (Connection prematurely closed by remote server)
FTL.log:2025-02-13 13:52:16.498 CET [74751/F36170] WARNING: Connection error (127.0.0.1#5335): TCP connection failed while receiving payload length from upstream (Connection prematurely closed by remote server)
FTL.log:2025-02-13 16:23:46.893 CET [76039/F36170] WARNING: Connection error (127.0.0.1#5335): TCP connection failed while receiving payload length from upstream (Connection prematurely closed by remote server)
FTL.log:2025-02-13 16:23:47.089 CET [76040/F36170] WARNING: Connection error (127.0.0.1#5335): TCP connection failed while receiving payload length from upstream (Connection prematurely closed by remote server)
FTL.log:2025-02-13 17:40:50.809 CET [76494/F36170] WARNING: Connection error (127.0.0.1#5335): TCP connection failed while receiving payload length from upstream (Connection prematurely closed by remote server)
FTL.log:2025-02-13 17:47:24.218 CET [76541/F36170] WARNING: Connection error (127.0.0.1#5335): TCP connection failed while receiving payload length from upstream (Connection prematurely closed by remote server)
FTL.log:2025-02-13 17:48:05.530 CET [76546/F36170] WARNING: Connection error (127.0.0.1#5335): TCP connection failed while receiving payload length from upstream (Connection prematurely closed by remote server)
FTL.log:2025-02-13 19:12:49.908 CET [77301/F36170] WARNING: Connection error (127.0.0.1#5335): TCP connection failed while receiving payload length from upstream (Connection prematurely closed by remote server)
FTL.log:2025-02-13 19:12:49.909 CET [77303/F36170] WARNING: Connection error (127.0.0.1#5335): TCP connection failed while receiving payload length from upstream (Connection prematurely closed by remote server)
FTL.log:2025-02-13 19:12:49.909 CET [77302/F36170] WARNING: Connection error (127.0.0.1#5335): TCP connection failed while receiving payload length from upstream (Connection prematurely closed by remote server)
FTL.log:2025-02-13 19:21:20.742 CET [77453/F36170] WARNING: Connection error (127.0.0.1#5335): TCP connection failed while receiving payload length from upstream (Connection prematurely closed by remote server)
FTL.log:2025-02-13 19:21:20.742 CET [77454/F36170] WARNING: Connection error (127.0.0.1#5335): TCP connection failed while receiving payload length from upstream (Connection prematurely closed by remote server)
FTL.log:2025-02-13 19:21:20.758 CET [77452/F36170] WARNING: Connection error (127.0.0.1#5335): TCP connection failed while receiving payload length from upstream (Connection prematurely closed by remote server)
FTL.log:2025-02-13 19:37:58.159 CET [77672/F36170] WARNING: Connection error (127.0.0.1#5335): TCP connection failed while receiving payload length from upstream (Connection prematurely closed by remote server)
FTL.log:2025-02-13 19:37:58.160 CET [77673/F36170] WARNING: Connection error (127.0.0.1#5335): TCP connection failed while receiving payload length from upstream (Connection prematurely closed by remote server)
FTL.log:2025-02-13 19:37:58.165 CET [77674/F36170] WARNING: Connection error (127.0.0.1#5335): TCP connection failed while receiving payload length from upstream (Connection prematurely closed by remote server)
FTL.log:2025-02-13 19:42:22.236 CET [77810/F36170] WARNING: Connection error (127.0.0.1#5335): TCP connection failed while receiving payload length from upstream (Connection prematurely closed by remote server)
FTL.log:2025-02-13 19:42:22.243 CET [77811/F36170] WARNING: Connection error (127.0.0.1#5335): TCP connection failed while receiving payload length from upstream (Connection prematurely closed by remote server)
FTL.log:2025-02-13 19:42:22.243 CET [77812/F36170] WARNING: Connection error (127.0.0.1#5335): TCP connection failed while receiving payload length from upstream (Connection prematurely closed by remote server)
FTL.log:2025-02-13 19:52:27.693 CET [78473/F36170] WARNING: Connection error (127.0.0.1#5335): TCP connection failed while receiving payload length from upstream (Connection prematurely closed by remote server)

Pi-hole Debug can be found on: https://tricorder.pi-hole.net/AmpmDhS6/

I use unbound 1.19.2 using DoT with cloudflared.

1 Like

Very recently, this has been intensively analysed and identified as being caused by specific behaviour of unbound, see Two Pi-hole instances, One with "failed to send..." - #44 by DL6ER.

There is currently nothing that Pi-hole could do to improve this.

The condition has been reported to unbound, where some potential measures are currently explored (e.g. increasing unbound's incoming-number-tcp).

You may consider to contribute your observation over at failed to send TCP(read_write) packet (Connection prematurely closed by remote server) · Issue #1237 · NLnetLabs/unbound · GitHub.

1 Like

Hi,
Just a small correction :slight_smile:

incoming-num-tcp: 

The "incoming-number-tcp" was a typo by the unbound guy...

I have tried with 100, and below, got a few hits when I used a setting with 20.

@G241 if you could add your examples to the unbound post Bucking_Horn mentioned it would be great, also if you have the examples from the unbound log.

Unbound config:

server:
    # If no logfile is specified, syslog is used
    logfile: "/var/log/unbound/unbound.log"
    log-time-ascii: yes
    verbosity: 3

    incoming-num-tcp: 20

    interface: 127.0.0.1
    port: 5335
    do-ip4: yes
    do-udp: yes
    do-tcp: yes

I lowered verbosity to 3 from 5 as the log file got huge.

3 Likes

Same issue on my PiHole.
I have been running on a Pi4 since 2-3 years ago.
I did an apt update last night, which killed my Pihole installation. I then did a fresh one, and now I have this error constantly showing.
Oddly, my entire WebGUI looks utterly new on my new install (random comment)