I maid a multiplayer online game with unity3d 2017 UNET.
The servers are run on a windows dedicated server in batchmode.
My big problem is after a some hours of running servers , no body can not connect to servers. And Connection Timeout error shows up !
But at the moment the servers are set up, everything goes well and players can join the game and play.
Does anyone know where the problem is?
What I only have in the servers is :
1- An empty scene.
2- Two scripts : my custom networkmanager script and another script for controlling game and send and receive syncvars and commands and some coroutines for controlling the game. i have no update function or some huge code !
Have you checked the log file, and checked memory/cpu usage for the dedicated server? I’m running dedicated unity servers without any issues. Have had them running for months at a time. I don’t use the HLAPI though. I use networkclient and networkserversimple classes.
I use UNET HLAPI and for early hours after i run EXE files as server it works fine but after 10 or 12 hours nobody can not connect to them and i a have to shout down and restart servers.
After a while, log file size will increase , i open it and i see this errors :
recv filed for host {0}, error {1232}. Host will be closed
host id {0} invoked wrong io operation and will be deleted
host id {0} invoked wrong io operation and will be deleted
(Filename: Line: 548)
host id {0} out of bound or host has been already removed
(Filename: Line: 514)
I add that I use vps for my servers an its not a physical dedicated .
I seem to recall there are serious issues with the HLAPI, which is why it’s been dumped by Unity. There is a community built HLAPI replacement on github. Hope that helps.
I have another question .
I’m actually working on a first person shooter (room based) multiplayer online game.
And According to your statements, I decided to use LLAPI .
for now that i use HLAPI, i didn’t find a way to make a room based game and i made rooms with multiple EXE files running and players get servers port and IP from database and then connect to servers.
In LLAPI is there a way to make multiple rooms with running only one EXE file ?
I mean is there any facilities to make virtual rooms in one server and players join to rooms or something like that ?
Actually I use my own lobby server that spawns match servers as needed with the Process() class.The match server is given it’s ip address, port, and matchid in the command line. I know I’ll have to change this once I’m running on multiple hosts, but it does me for now whilst testing.
1 - So you are run EXE files as server with Process() ?
2 - Is it matter we run servers on a VPS (virtual) server or a physical dedicated server ?
Because I run my servers on a VPS …
If i run on a physical dedicated server will there be any changes in its quality?