This error very very often occurs straight after you have had a connection break (e.g. the server terminated the connection, your server process had the KILL command run against it or the network connection between you and the server was broken), and especially if your client is using connection pooling in those circumstances.
So try looking at what happened prior to the error you're seeing.