Can anyone help me? sorry bad english

i use zerotier to play terraria with my friend it work but if i play for too long the server automatically switch too offline and i need restart the server to continue the game and i feel very annoying about this problem can anyone fix it please?