AMP 'Proteus' 2.8.0 Release Notes

AMP 2.8.0.2 ‘Proteus’

Special thanks to FMA Wrath 2069 and jeevis from Discord for their help and countless hours spent identifying key factors that led to the root cause being found!

This update comes after a long investigation into why Palworld saves on Windows (and potentially Wine) were getting corrupted in AMP.

The change is minor but we suspect a bigger impact on this one. We introduced Kestrel (by Microsoft) as the web server for AMP when we rolled out .NET 8. Most web servers host static content of some type when you visit their page. AMP serves everything through the API, so there was never a need to configure a directory for the content. This means Kestrel defaulted to the instance directory being treated as the content directory. In .NET the content directory of a web server is watched for file changes. Every file change gets checked by the server in case it needs to act on it. We’ve configured this setting and disabled the file watching to prevent this wasted file accessing.

We’re investigating how this impacts live backup issues we’ve been experiencing as that could involve the same mechanisms. As well, this would slightly hurt performance anytime file operations were done within an AMP instance or game server.

How does this involve Palworld?

There’s a bug in Palworld’s 30 second autosave process in 1.0 that makes it inherently fragile on Windows environments. They rename a temporary save file to replace the main one, and during this split-second change Kestrel was also trying to find out what changed on the file. This caused a race condition where both programs were trying to access the same file and one would lose. If Palworld lost it would result in a corrupted save.

In short, a bug in the autosave of Palworld was escalated by a bug in the configuration of AMP’s web server.