Comments (14)
It seems that only pings can maintain a connection established, so even if there is traffic between the machines, if one losses one ping, it will timeout. I made this change to reset the timeout countdown with all traffic and the problem dissapeared: forestrf@0f8836b
I hope it helps
from lidgren-network-gen3.
I'm assuming this change would need to be incorporated in both the client and the server?
from lidgren-network-gen3.
If you mean if it needs to be on all of the compiled clients and servers, then yes. If the problem is the one I described and not other, the timeout can happen because the server kicks you and because a client disconnects, both thinking that the other is no longer there and acting according to it
from lidgren-network-gen3.
Why not make this into a pull request?
from lidgren-network-gen3.
Done, I was not secure about it even if it fixed the problem for me. I keeped the changes to a minimum
from lidgren-network-gen3.
Nice 👍
from lidgren-network-gen3.
We deployed the fix to our servers, and it doesn't seem to have changed anything, but we haven't updated the clients yet. We won't be able to for another few days. I'll post back when we can get it tested on clients.
from lidgren-network-gen3.
To give a little more information: currently we typically have about 100 clients spread across 8 different servers. On each of those servers, we see a rate of about one connection time out per minute. People also report that when this happens, they sometimes are unable to reconnect right away; sometimes they will have to try for several minutes. I am assuming this is because they are trying to reconnect to the same server, because our servers are part of a round-robin, and there's probably some DNS caching somewhere down the line causing the address to be resolved to the same server. Now, as to why they can't actually connect back to the same server after the connection is lost on both ends, I have no idea.
from lidgren-network-gen3.
You can also try to increase in the server the timeout configuration to something bigger, it may be worth the shot. I am looking at the code and any message from the ordered or sequenced types should send an ACK that should reset the timeout countdown when received, so I think that there is some problem there.
from lidgren-network-gen3.
We have already increased the timeout length to around 60 seconds, on both client and server. It didn't really seem to do anything.
The messages that are sent to these servers are all ReliableOrdered. Are you saying that the ACK might not be getting through?
from lidgren-network-gen3.
I dont understand how all that system works so I don't know what triggers the problem, but the logic seems right
from lidgren-network-gen3.
Okay, so we fixed the reconnect problem. We were hitting our maximum users on the server, but we didn't have any log messages about it.
The connection time out still eludes us though.
from lidgren-network-gen3.
We were finally able to deploy the client code yesterday. We are still seeing a heavy volume of connection time outs. We might load up Wireshark or something like that to analyze the packets and see if the connections are legitimately timing out. If they are legitimately timing out, then it must be something we're doing wrong on our end. Anything in particular that would be good to look out for?
from lidgren-network-gen3.
It turns out that the remaining connection time outs were caused by a race condition in the version of mono we were running on our master servers, which was manifesting in the latest MongoDB C# driver. We recompiled the MongoDB C# driver source with some workaround code, plus we updated to mono 4.0, and we are now seeing a "normal" amount of connection time outs.
For reference, here is the MongoDB C# driver issue:
https://jira.mongodb.org/browse/CSHARP-1144
from lidgren-network-gen3.
Related Issues (20)
- ReceivedPong doesn't consider late/not in order pong messages HOT 8
- Incorrect network messages/malformed packets could easily overwhelm the server HOT 2
- Cannot Reconnect
- Example Code from Basics doesn't yield same results HOT 1
- Trying to compile for Android HOT 2
- Accepting connection does not increase ConnectionsCount? HOT 1
- Is there a possibility to modify lidgren to support DTLS??
- [QUESTION] Thread safety HOT 5
- Unity 2019.4 LTS: calling client.Connect gives SocketException Invalid arguments immediately HOT 3
- Active forks? HOT 13
- Large unreliable message cannot be sent properly HOT 2
- Might want to lock stuff here? HOT 2
- The examples client gives error when trying to connect to server form second VS
- Unity network
- Is it possible to send and receive structs instead of classes ? HOT 1
- Is it still possible to build for Unity? HOT 3
- NetQueue concurrency HOT 2
- ICMP Destination unreachable (port unreachable) won't close connection HOT 1
- Server can't receive connection HOT 1
- Lidgren.Network.NetException: This message has already been sent! HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lidgren-network-gen3.