Terminal long string disconnection issue

More details please… what hardware device are you using and can you show your sketch please.

When posting code, please follow the “format” procedure as shown in the Welcome Topic: