Fix macOS Screen Sharing frequent pauses or freezes
Ever since upgrading my Macs to macOS Sierra, there have been one or two times when using Screen Sharing (as part of Back to My Mac) when the session would freeze up, or intermittently pause. It seemed that every 5 or 10 seconds, there would be 10 seconds where the shared screen would stay frozen.
I could enter keystrokes, but things like pasting or clicking was hit-or-miss. This made it extremely annoying to work on one of my headless Macs (without a monitor plugged in), because I could only do work in brief spurts!
I opened up the Console app (in Applications > Utilities) to see what was happening, and quickly found that the following three errors were logged any time the screen would freeze: