Unity3D network disconnects on idle (VR Game)

I am making an application which is run on external hardware machines. It will be turned on in the morning and turned off in the night. There may be huge gaps of idle time in between if there are no customers. If the idle period is long, it disconnects. The following is my connection config. please help me out.

		connectionConfig.MaxConnectionAttempt = byte.MaxValue;
		connectionConfig.ConnectTimeout = 3000;
		connectionConfig.MaxCombinedReliableMessageCount = 20;
		connectionConfig.MaxCombinedReliableMessageSize = 200;
        connectionConfig.DisconnectTimeout = 3000;
        connectionConfig.NetworkDropThreshold = 50;
        connectionConfig.PingTimeout = 500;

Do let me know if I should provide more information. The clients can disconnect and should be able to reconnect without stopping the whole network ( I figured that part). But I am not able to handle the case where the server disconnects on time out.

Well you may want to increase the “DisconnectTimeout” which may reduce the chance of missing any keep-alive packets. Also make sure your application actually runs in the background. Many forget about this. In any networking application this is crucial.

You can either tick “run in background” in the player settings or set Application.runInBackground to true in your script.