POSSIBLE CAUSE of random world corruption issue during dedicated server world save.

71 votes

After much testing, many lost hours of progress and setting up incremental backups to minimise losses, I have been able to replicate and (so far) prevent the random dedicated server crashes that were occuring during a world save at random.

The root cause appears to be the use of valloc during a world save, in combination with very large swap files.

In my testing I have gone from regular crashes of several times a day, to zero crashes over the past several days on my dedicated server that's in use 16hrs+ a day by multiple players.

The only factor that has changed in these scenarios is the size of the swap file.

I post this in the hope this provides a testing method for the developer to try that may not have been evaluated or noticed.

If this turns out to be the cause, or significantly contributes to the issue, I recommend moving away from deprecated methods of memory allocation to avoid page file size being a factor, as this is an uncontrollable variable from user to user.

Under consideration Suggested by: Seph Upvoted: 27 Nov, '22 Comments: 1

Comments: 1