World Auto Resume Trouble

Description, details and error message(s)

Once a world stops it no longer seems to auto resume even though the dashboard shows that “Auto suspend/resume” is On.
We call _coherenceBridge.CloudService.Worlds.FetchWorlds(OnFetchWorlds);
but the world we want to join is not included in the results.

Expected behaviour

Previously, I believe the world was included, then we called JoinWorld and were able to join the world

Screenshots

How to reproduce

Steps:

  1. Set Auto suspend/resume set On
  2. Let a world auto suspend
  3. Attempt to join the world

Environment

SDK: 1.2.3
Unity: 6000.10f1
OS/Platform: WebGL

Did you perhaps stop the world explicitly? One thing that might not be clear is that if you stop the world explicitly, it will not auto-resume. This is an unclear UX issue that we will address.

If not, we’ll investigate what might be going on.

Also, the resume functionality happens on first login of a player, are you awaiting a WaitForCloudServiceLoginAsync or similar API call before requesting worlds?

Thanks @brit ,
We may have stopped the world explicitly at some point, but we have since restarted it through the dashboard and yesterday I had to restart the world in the dashboard and then after about an hour it would stop (even though I was logging in pretty consistently), then I would start it in the dashboard again and after about an hour it would die again.
I believe you have our login code that @michael.picerno shared. It does not have a WaitForCloudServiceLoginAsync call, but I’ll paste it below. It felt like something on the back end changed, because we didn’t change any login flow code (or anything related to coherence) and one day it was able to connect to this world fine and the next day it was not.

private async Awaitable ConnectToCoherence()
{
            Log(LogLevel.Debug, "Connecting to Coherence");

            _coherenceCloudService = _coherenceBridge.CloudService;

            Log(LogLevel.Verbose, "Waiting for _coherenceCloudService.IsConnectedToCloud...");
            while (!_coherenceCloudService.IsConnectedToCloud)
            {
                await Awaitable.NextFrameAsync();
            }

            Log(LogLevel.Verbose, "Waiting for _coherenceCloudService.Rooms.IsLoggedIn...");
            while (!_coherenceCloudService.Rooms.IsLoggedIn)
            {
                await Awaitable.NextFrameAsync();
            }

            _coherenceCloudService.Rooms.LobbyService.OnPlaySessionStarted += OnPlaySession;

            Log(LogLevel.Debug, "Requesting Regions");

            _connectToCoherenceRequestCompletionSource = new AwaitableCompletionSource();
            JoinCurrentRoomInRegion(newRegion: "us");

            if (_connectToCoherenceRequestCompletionSource != null)
            {
                await _connectToCoherenceRequestCompletionSource.Awaitable;
            }
}

You are correct - after investigation we found a race condition in a throttle we are using on warming up project resources. We’ve implemented a fix and will be deploying it soon.

1 Like

https://coherence.io/ seems to be down, don’t know if it was related.

Unfortunately, this was due to a web service provider we use on the website that was beyond our control. Sorry for the hiccup.

Also, just a heads up - we plan to deploy the warmup fix early next week as we are including other larger fixes. Are you able to start the world manually and work as needed until then?

Thanks, glad to hear a fix is coming.
We can get by with manually restarting it for now.
The customers we are hoping to move to the new coherence based solution have high up time requirements in our SLAs. This would have been a tough situation if they were already moved over.

Is there an update for this?

Ah, yes - we deployed this update yesterday. Apologies I forgot to ping this thread. Are you still seeing your world not auto-start?

I restarted it earlier this morning, it’s been up for 4 hours and hasn’t suspended yet. I can’t tell if there are any other connections to it at the moment to see if it has supposed to suspended.

A quick scan of logs does show activity throughout the day today, so yes, the worlds auto-stop is at 1 hour: https://coherence.io/dashboard/virbela/virbela/logs/us/worlds/26414826/replicator-worlds

Alrighty, thanks. Seems to be all good now.