MP Dedicated Server - Autosave when no players are connected
Moderator: ickputzdirwech
MP Dedicated Server - Autosave when no players are connected
The autosave system works wonderfully for dedicated servers, but it can affect the flow of the game if the interval is set too low. By default, when all players leave, the game is paused until a player connects to the server once again.
I keep my dedicated server up and running 24/7. If the autosave interval is set too high, and the server crashes at an inopportune time, it's possible that a lot of work could be lost. An option for the server to automatically save the main save file when no players are connected would be a big help. Obviously this wouldn't help if the servers crash while players are connected, but in my case (and presumably the case of people playing with friends) where the server is paused for a good chunk of time, this option would save a lot of headaches.
I keep my dedicated server up and running 24/7. If the autosave interval is set too high, and the server crashes at an inopportune time, it's possible that a lot of work could be lost. An option for the server to automatically save the main save file when no players are connected would be a big help. Obviously this wouldn't help if the servers crash while players are connected, but in my case (and presumably the case of people playing with friends) where the server is paused for a good chunk of time, this option would save a lot of headaches.
Re: MP Dedicated Server - Autosave when no players are connected
The server supports all sorts of arguments, what i'm using is
Factorio.exe --start-server Modded1.zip -c D:\pelit\Factorio\config-server.ini --no-auto-pause --latency-ms 110 --autosave-interval 10 --autosave-slots 5
So if you add the --no-auto-pause, it will keep autosaving when no players are on. Without that there isn't even need to save, because time is stopped.
Factorio.exe --start-server Modded1.zip -c D:\pelit\Factorio\config-server.ini --no-auto-pause --latency-ms 110 --autosave-interval 10 --autosave-slots 5
So if you add the --no-auto-pause, it will keep autosaving when no players are on. Without that there isn't even need to save, because time is stopped.
Re: MP Dedicated Server - Autosave when no players are connected
Thats not the same thing.
Some people want the game to not run when there is no one connected, depleting resources, maybe getting overrun by biters. So you want auto pause.
Now if the auto save time is 10 minutes, and every one leaves at 9 minutes, my understanding is that Factorio will not autosave. Then maybe in the next 15 hours it crashes, server resets, etc, then you loose those 9 minutes.
Some people want the game to not run when there is no one connected, depleting resources, maybe getting overrun by biters. So you want auto pause.
Now if the auto save time is 10 minutes, and every one leaves at 9 minutes, my understanding is that Factorio will not autosave. Then maybe in the next 15 hours it crashes, server resets, etc, then you loose those 9 minutes.
Re: MP Dedicated Server - Autosave when no players are connected
Not exactly sure when it autosaves, but when another player joins it propably notices that it's been more than the 10 minutes since last save. And it can't crash when paused when it's not doing anything. Also the scenario that there would be multiple visits on server shorter than the autosave frequency is a bit far fetched? 
Re: MP Dedicated Server - Autosave when no players are connected
Here's the scenario I was envisioning:Zaflis wrote:Not exactly sure when it autosaves, but when another player joins it propably notices that it's been more than the 10 minutes since last save. And it can't crash when paused when it's not doing anything. Also the scenario that there would be multiple visits on server shorter than the autosave frequency is a bit far fetched?
- I set my server's autosave interval to 30 minutes to keep the flow of the game.
My friends and I are playing at night
The game autosaves at 9:30, and we play until 9:50 or so, when we all log off at the same time
In the middle of the night, my computer restarts, force closing the server without saving the game
We lost 20 minutes of work because the last autosave was from 9:30
Hope this helped clear it up.
Re: MP Dedicated Server - Autosave when no players are connected
That is not really true, even if the game is not doing anything, the rest of the system is, and it is still sat in volatile memory. Power outage, system crash, user initiated system restart, low system memory, low disk space (done this before, left more logging enabled in a separate program than I intended and it ate all the free disk space over night), or any other of many things that could cause Factorio to unexpected terminated or to fail to save when a user does join.Zaflis wrote:And it can't crash when paused when it's not doing anything.
Re: MP Dedicated Server - Autosave when no players are connected
But yes i agree with you that it should be saving at least once after players leave.
Ok after tested the saving myself on 0.12.31 server i can confirm it doesn't work how we would like it to. It's not autosaving at all after players leave, even if quick visit is done after long time of not saving.
Ok after tested the saving myself on 0.12.31 server i can confirm it doesn't work how we would like it to. It's not autosaving at all after players leave, even if quick visit is done after long time of not saving.
- GregoriusT
- Filter Inserter

- Posts: 380
- Joined: Wed Apr 10, 2019 6:42 pm
- Contact:
[Suggestion] Autosave for Host when paused for more than 1 Minute
Autosave for Host when the Game is paused for more than 1 Minute (real life time not ingame, and configurable ofcourse).
Yep that is about it, why am I asking for this Feature?
Because sometimes the Server Host falls asleep during the session, and it takes up to 15 minutes (in our particular case) of waiting time until I am certain an autosave happened, so i can safely pause the game and leave. I cant tell whether an autosave happens because non-blocking saves are enabled, and those 15 minutes are ingame time and i dont know the hosts UPS, which supposedly are half my own (since the slowest computer must be the host), so it might even be half an hour of waiting time instead.
Simply said, this gives anyone with the right to pause the game, the ability to trigger an autosave, if the server has this feature enabled, while at the same time not spamming autosaves whenever the game is paused for less than a minute, like the manual pause I do when i need to catch up due to latency spikes in my transatlantic internet connection.
Why this way and not just a "trigger autosave" button? Because it is harder to forget if it happens automatically when the game is paused, and additionally, if nobody is online and the server auto-pauses due to that, it will make a safety save too.
Yep that is about it, why am I asking for this Feature?
Because sometimes the Server Host falls asleep during the session, and it takes up to 15 minutes (in our particular case) of waiting time until I am certain an autosave happened, so i can safely pause the game and leave. I cant tell whether an autosave happens because non-blocking saves are enabled, and those 15 minutes are ingame time and i dont know the hosts UPS, which supposedly are half my own (since the slowest computer must be the host), so it might even be half an hour of waiting time instead.
Simply said, this gives anyone with the right to pause the game, the ability to trigger an autosave, if the server has this feature enabled, while at the same time not spamming autosaves whenever the game is paused for less than a minute, like the manual pause I do when i need to catch up due to latency spikes in my transatlantic internet connection.
Why this way and not just a "trigger autosave" button? Because it is harder to forget if it happens automatically when the game is paused, and additionally, if nobody is online and the server auto-pauses due to that, it will make a safety save too.
Don't underestimate Landmines!
Biters bite, Spitters spit, Spawners spawn and Worms... worm? - No, they throw their vomit! They even wind up to directly hurl it at you! friggin Hurlers...
Biters bite, Spitters spit, Spawners spawn and Worms... worm? - No, they throw their vomit! They even wind up to directly hurl it at you! friggin Hurlers...
-
ro011110ot
- Burner Inserter

- Posts: 7
- Joined: Thu Oct 13, 2016 5:38 pm
- Contact:
Re: [Suggestion] Autosave for Host when paused for more than 1 Minute
+1 Autosave when the last Player left the Server.
Re: MP Dedicated Server - Autosave when no players are connected
[Koub] Merged into an older thread with a similar suggestion.
Koub - Please consider English is not my native language.
- GregoriusT
- Filter Inserter

- Posts: 380
- Joined: Wed Apr 10, 2019 6:42 pm
- Contact:
Re: [Suggestion] Autosave for Host when paused for more than 1 Minute
Please note my suggestion should ALSO be for non-dedicated Servers, as just joining someone else using steam is a very common way of playing. Especially with the whole "if host falls asleep" bit being the main reasoning on my end.
Don't underestimate Landmines!
Biters bite, Spitters spit, Spawners spawn and Worms... worm? - No, they throw their vomit! They even wind up to directly hurl it at you! friggin Hurlers...
Biters bite, Spitters spit, Spawners spawn and Worms... worm? - No, they throw their vomit! They even wind up to directly hurl it at you! friggin Hurlers...

