Developers, I registered here only to report that this issue has something to do with pi-hole itself. Like others I started to get these warning after I upgraded from v5 to v6 and now I am on the latest versions of everything, 6.0.5, 6.0.4, 6.0.2. And I use unbound. The warnings started to appear about a month after the upgrade.
The reason I think the issue is with pi-hole itself is I never used port 5353 for unbound. I set it to 53535 and the Custom DNS server is set to 127.0.0.1#53535 in pi-hole. Yet, the warning in pi-hole is like everybody else's: WARNING Connection error (127.0.0.1#5353): TCP connection failed while receiving payload length from upstream (Connection prematurely closed by remote server).
According to sudo pihole -d nothing listens on TCP port 5353. How come I get this warning in pi-hole when port 5353 is not even in use. Something is not right somewhere.
That thread is closed now. I hope that minor bug is in the pipeline to be fixed so it won't confuse other people, escpecially those who just added another digit to the preset port.
By the way, port 5353 is used for mDNS by default. That's why I changed it for pi-hole because I had avahi daemon on the same RPi. Maybe it's a good idea to update the tutorial for setting up pi-hole with unbound, so it suggest another unreserved port.
I remember adding a digit to it to avoid conflicts with mDNS. But I never noticed that the port number in the guide was changed. Moreover, I didn't even notice the different port in the original thread here. 5353 and 5335 look surprisingly similar to me at first glance. But that's my problem. Thanks for clearing everything up.