Page 1 of 1
MP Dedicated Server - Autosave when no players are connected
Posted: Thu Apr 28, 2016 3:31 pm
by orbitarm
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.
Re: MP Dedicated Server - Autosave when no players are connected
Posted: Thu Apr 28, 2016 10:06 pm
by Zaflis
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.
Re: MP Dedicated Server - Autosave when no players are connected
Posted: Fri Apr 29, 2016 7:39 am
by SyncViews
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.
Re: MP Dedicated Server - Autosave when no players are connected
Posted: Fri Apr 29, 2016 12:45 pm
by Zaflis
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
Posted: Fri Apr 29, 2016 1:01 pm
by orbitarm
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?

Here's the scenario I was envisioning:
- 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
Not too far fetched in my opinion. If the game was just set to autosave when everyone left the server, there would be no issue. It seems easy enough to implement since they already have autosave features.
Hope this helped clear it up.
Re: MP Dedicated Server - Autosave when no players are connected
Posted: Fri Apr 29, 2016 1:22 pm
by SyncViews
Zaflis wrote:And it can't crash when paused when it's not doing anything.
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.
Re: MP Dedicated Server - Autosave when no players are connected
Posted: Fri Apr 29, 2016 1:48 pm
by Zaflis
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.
[Suggestion] Autosave for Host when paused for more than 1 Minute
Posted: Fri Nov 07, 2025 7:10 pm
by GregoriusT
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.
Re: [Suggestion] Autosave for Host when paused for more than 1 Minute
Posted: Sat Nov 08, 2025 11:44 am
by ro011110ot
+1 Autosave when the last Player left the Server.
Re: MP Dedicated Server - Autosave when no players are connected
Posted: Fri Nov 14, 2025 9:50 am
by Koub
[Koub] Merged into an older thread with a similar suggestion.
Re: [Suggestion] Autosave for Host when paused for more than 1 Minute
Posted: Fri Nov 14, 2025 11:59 am
by GregoriusT
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.