cinderblock / factorio-stats

A Simple Factorio Server Status Webpage
0 stars 0 forks source link

Constantly polling the server for status over RCON means the server doesn't pause #1

Open cinderblock opened 1 week ago

cinderblock commented 1 week ago

As described here: https://forums.factorio.com/viewtopic.php?f=23&t=98285&p=545459

We're sending a lot of RCON messages to the server constantly, even when things aren't changing. Because of an implementation detail on the Factorio internals, this means it must advance the game one tick for every call. This means the server is counting forward while "paused".

If we dramatically reduce the number of calls when the game is paused, it will mitigate this problem to the point of not being an issue.

cinderblock commented 1 week ago

This line does some basic backoff already: https://github.com/cinderblock/factorio-stats/blob/620e73ba51ca17069b2fcb78d890d276b2207e2c/backend/FactorioConnection.ts#L117