"process is running, but connection is lost" –
{Client,Server}Alive{Interval,CountMax} will probably help.