Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Shrikky23 · Dec 15, 2017 at 11:01 PM · networkingdisconnecttimeout

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.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Bunny83 · Dec 16, 2017 at 02:19 AM

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.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Shrikky23 · Dec 16, 2017 at 05:22 PM 0
Share

Run in background is set to true in player settings. I am wondering if I should send a bool "$$anonymous$$eep alive" that toggles every few seconds ..going between the clients and server to fake it so it never goes to idle? Could you please explain how the internal keep alive packets works? Does it send only when some sync var change or when packets are transferred?

avatar image Shrikky23 · Dec 18, 2017 at 06:51 PM 0
Share

Update : Left the computer on in the non-vr mode. The game didn't crash. I am going to leave it on tonight with VR mode and update anyone else who is having the same problem. I suspect it has something do with VR In Unity or S$$anonymous$$m VR itself.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

105 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Unity Local network always disconnects after ~1053 seconds 0 Answers

is LLAPI bandwidth limited? 0 Answers

Unity High Level Api Random Disconnect 0 Answers

[UNET] Why client always random disconnect? 1 Answer

Network disconnect player 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges