Controller stops communicating

Though I don’t have Scienci hardware, I’ve had a similar experience that may or may not shed some light on the subject.
I chose UGS platform to control my GRBL controls. I have a homebuilt router that I use often, but I also added one to a CNC machine at work that I use regularly. When I first started using it I would have programs of about 10,000 lines of G-CODE, and it would disconnect randomly after about 3,000 lines of code. I eventually found a discussion of the problem on the UGS site, and they pointed to a configuration setting that selects between about 4 different serial routines that were supported.
These were running on Linux Mint, and the default serial routines were problematic, so I switched to the one they recommended and it has worked nearly flawlessly since then. The only problem I have now is if I turn on the heat gun on the same circuit as the GRBL controller it throws a limit switch error, and needs to be reset. When I get around to it, I’m going to put a bigger capacitor on the power supply to see if that will fix it.
I hope this helps.

Thanks to all for the info. I will just have to wait till it happens again to do more checks.