At present, after being distributed through MatchMaker, the Server will be opened
But after an hour, the server will be shut down,
This is very disturbing,
So here I want to ask how to notify the server that the game has started,
Don’t automatically forcibly close the game after an hour because you didn’t receive the allocation message.
Could you provide a link to the server where you are seeing this behaviour?
Multiplay will know that the game has started once a server is allocated. However, there is a default timeout of 1 hour on an allocation. The support team can change this value for you.
We are evaluating ways to put the configuration of this value safely into the API and dashboard in the near future.
@danri
I provide the Log of the previous test,
These two times did not receive the Allocate event,
There should be server information in it for reference.
Yes, because it may be required early in the game,
Do a lot of stress testing on the server,
It would be much more convenient if we could test without interruption, thank you~
I can see from our backend systems that your server is allocated correctly. I also see that from the latest log from server 43024964 that the server does have the correct allocation IDL
Server ID : 43024964
AllocationID : cef5b25f-f35e-4467-b6ed-2f491ebee819
Port : 9000
QueryPort : 9010
LogDirectory : 43024964/logs
So it seems like the allocate callback is partially working, or at least the server is able to get the allocation ID on startup from MultiplayService.Instance.ServerConfig.AllocationId.
My guess would be that the the Start_MuiltyPlay method is the problem here. Is that method being called by another MonoBehavior Start method somewhere else?
We recommend that the allocate callback is set up in the Start method, so it is as early as possible in the server lifecycle. See the docs for more info:
I can’t speak towards the 1 hour timeout, as danri mentioned.
However, I can speak towards the potentially missed allocations:
The code:
m_ServerEvents = await MultiplayService.Instance.SubscribeToServerEventsAsync(m_MultiplayEventCallbacks);
if (!string.IsNullOrEmpty(MultiplayService.Instance.ServerConfig.AllocationId))
{
await StartGame();
}
Reads to me that, if an allocation has not been done at startup, then “StartGame()” will not be called.
Do you also call StartGame() inside of your OnAllocate function?