I restarted my server which eliminated the issue for the moment, though I suspect it will reoccur at some point. I also experimented on a separate VM and confirmed I could bring down the engine_main process in isolation and then have the launcher spin it back up with additional custom logging inside that loop. If the problem does reproduce and restarting the engine_main process doesn't eliminate it then I should be able to learn more next time.
I doubt I will get around to creating a PR any time soon as I know the private server code very well and have many other projects that are progressing slowly.
So if anyone else wants to put a PR in for this, feel free.
I expect the issue is down to versions. npm was reporting beta-9 but I am not convinced that is what we are running. Will investigate on our end.
thanks for your time.
the private server can only go as fast as the user scripts it's running. If you set the tick rate to 5ms, it will try to go that fast, but if your script takes 20ms, then that plus however long the processing between ticks takes, will be your actual tick rate. It gets even more prominent the more users you have, or the larger the map is.
the database file is just a json file .. you can try to fix it but it most probably is corrupted somehow that you will loose your data... I think the logfile tells you where the problem in the json file is.
I know it won't help you with the old file but you should do backups of the file or use a mod like screepsmod-mongo that uses a real database.
the included "database" always dumps the whole data when saving it .. so it is not very performant or safe for much data.
There are a number of private servers available. There is a list of them available in the forum.
One of the most famous ones is ags' server. There's also a channel on slack dedicated to it: #screepsplus.