You have to follow these steps for how to fix Roblox error code 277:
So ContextActionService must be used in a Local Script, which unfortunately also means changing the Humanoid’s health isn’t as easy as: Local Scripts cannot change these types of values because it would allow hackers to easily manipulate their own health and ruin the game for everyone by being immortal.
Unpatchable Glitches
Roblox is very sensitive to your network. So if your Roblox keeps disconnecting, you'll need to troubleshoot your network. Roblox gives its message that it lost connection when it doesn't get a response from the game servers after a certain length of time.
To your original question, no, there is no way to increase the Roblox timeout length. You can try keeping track of the time since a client hasn't sent any input, and teleporting the user out and back into the game using TeleportService when the timer reaches 19 minutes.
4:438:24How To AFK Without Getting Kicked! Pet Fighting Simulator (Roblox)YouTubeStart of suggested clipEnd of suggested clipBut you will not get kicked for being afk. That's the main thing in roblox. If you uh don't touchMoreBut you will not get kicked for being afk. That's the main thing in roblox. If you uh don't touch the game for 20 minutes you uh you'll get kicked. Because you're away from keyboard.
3:288:08*NEW* HOW TO AVOID BEING DISCONNECTED WHILE AFK ...YouTubeStart of suggested clipEnd of suggested clipAround 10 to 20 seconds to break the chest. But then it's basically going to give you the sameMoreAround 10 to 20 seconds to break the chest. But then it's basically going to give you the same amount as if you equip all 15 pets and then break it once every 20 seconds.