You seem to have made quite a number of different threads all referring to the same error message, which indicates that a connection reset occurred (i.e. the other side “hung up”). There is not a standard way to debug this as it is usually environmental. Do you devices have direct connections to the server, or are they connecting through any other nodes such as reverse proxy / load balancer. The majority of the time this error is caused by a misbehaving intermediate node which doesn’t understand web sockets and thinks they are dead connections and closes them.
To give some info about “heartbeat,” this is a leftover term from 1.x as technically 2.0+ does not use them anymore but instead uses web socket pings and pongs to accomplish the same idea. If your wireshark is set up to catch web socket messages then you might be able to see them but you will need to have started from the beginning of the conversation (i.e. before the web socket handshake) and have a wireshark sufficiently new enough to understand the web socket protocol. In fact if you have Wireshark 3.0 or above it is also capable of decoding the packets sent by Couchbase Lite and Sync Gateway (BLIP protocol). However, the “heartbeat” here is just a standard websocket ping/pong response (no BLIP involved).
All that being said, you are saying that the documents do not sync even after restarting the application? Does the same error show up again?