Android tablet stops after 2 days

Hello! I have connected an android Samsung Tab A on my boat system and it works fine but after a couple of days it stops working and shows the following message : impossible to connect error in the connection. But the wifi connections is working fine. I have reset the tablet twice but then the same problem .Any suggestions? thanks.