AssetService:SavePlaceAsync() failing to save for specific place ids, not throwing errors

In the created places in my game, I call AssetService:SavePlaceAsync() on a loop about every 100 - 120 seconds, and when the server closes. I used reserved servers with each place to ensure that only one instance of each place can be open at a time.

One of the places in my game, id 3820216462, has recently been failing to load the most recent version of the game when a new server starts up:

  • On June 17th, this place loaded an out of date version, despite SavePlaceAsync being called in the previous server session as usual and without throwing errors.
  • On June 18th, the place again loaded an out of date version, which may or may not have been the same old version as was loaded on the 17th.
  • On the 23rd, it loaded another out of date version, this version appeared to be from the 22nd.


If this is not a save or load failure, I could also speculate that this may be happening because there is some xbox user at this placeId who has cross platform play disabled, which breaks the assumption that only a single reserved server can exist for each access code. This would allow two servers of the same place to run at the same time, which would cause save conflict with both saving simultanously. There is no API for developers to detect this case, as I described here: Duplicate reserved servers created for XBox users with cross platform disabled

In the version history of the place, I can see a few instances of adjacent versions that seem closer together in time than usual, which could indicate two servers are running at the same time, causing conflicting saves. There are a few instances of this, but it is inconclusive because they are not as frequent as I would expect, I don’t know how these timestamps are generated, and it would be possible for two saves to be close together if the server closes soon after a loop save, incurring a second save from BindToClose.

  • 6/23/2020 2:59:42 AM to 6/23/2020 3:00:13 AM (31 second difference)
  • 6/23/2020 3:28:05 AM to 6/23/2020 3:28:24 AM (19 second difference)
  • 6/23/2020 7:04:40 AM to 6/23/2020 7:04:47 AM (7 second difference)
  • 6/23/2020 7:08:02 AM to 6/23/2020 7:08:20 AM (18 second difference)
  • 6/23/2020 7:09:42 AM to 6/23/2020 7:10:07 AM (25 second difference)
  • 6/23/2020 7:11:21 AM to 6/23/2020 7:11:32 AM (11 second difference)
  • 6/23/2020 7:11:32 AM to 6/23/2020 7:11:53 AM (21 second difference)
  • 6/23/2020 7:45:33 AM to 6/23/2020 7:45:51 AM (18 second difference)
  • 6/23/2020 7:47:20 AM to 6/23/2020 7:47:37 AM (17 second difference)
  • 6/23/2020 7:49:02 AM to 6/23/2020 7:49:23 AM (21 second difference)
  • 6/23/2020 7:50:07 AM to 6/23/2020 7:50:50 AM (43 second difference)
  • 6/23/2020 7:56:11 AM to 6/23/2020 7:56:51 AM (40 second difference)

Based on this information, it looks like perhaps there were two concurrent servers open on 6/23 in the windows of 7:04:40 AM - 7:11:53 AM, and 7:45:33 AM - 7:56:51 AM, but again I don’t know if this is conclusive.

If there are any save history logs available that are more informative and could determine if this is a save problem, a load problem, or if it can be confirmed that versions were being created from multiple servers concurrently, then I would I appreciate the support.

6 Likes

Have you found the cause of this? I am facing the same problem, with the difference that Xbox access is not enabled at all, and I save the place every 30 min. Sooner or later, the saves stop to show in the published versions list, while the game server gets no error msg.
I had a hunch 2 servers running in parallel despite the reserved server can happen in a server set on different continent (eg. Singapore vs. Europe), but have no proof for that.
The only thing I noted that the correct saves took about 2-3x more time than those unsuccessful (but not throwing error).

I implemented a patch using messagingservice to detect duplicate reserved servers and crash the one with all xbox users. To my knowledge, this hasn’t happened since that fix.

I suspect it’s more likely that your saves are failing then you have duplicate reserved servers; I’m pretty sure this can’t happen without xbox. I’d collect all the info you can and post a separate bug report.