Folia
Folia copied to clipboard
How to load/unload region while the folia server is running
Is your feature request related to a problem?
There are many scenarios, such as incompatible plugins, bugs, etc., that can lead to MSPT 1000+, 100% util in a region. The players within the region are unresponsive.
Describe the solution you'd like.
Can we detect and unload these abnormal regions in some way to enhance the stability of Folia?
Describe alternatives you've considered.
An Api or an existing command?
Other
No response
The server needs to be restarted in these cases.
In reality, this only happens due to the lack of a watchdog - which should automatically kill the server and warn when these events are happening.
The server needs to be restarted in these cases.
In reality, this only happens due to the lack of a watchdog - which should automatically kill the server and warn when these events are happening.
Is there no other way but to restart?
Imagine other players playing normally, but one or two players getting stuck due to a region bug and needing to restart the entire server
Can we restart bug region only?
I made a workaround for that, a script that send a command like /tps to the folia server running in tmux or docker. And if I don't get an answer, or if the value of the mspt is higher than x amount. Then It the script kill the server process. (It will look like a little rollback for players, but help in having a resilient server)
The server needs to be restarted in these cases. In reality, this only happens due to the lack of a watchdog - which should automatically kill the server and warn when these events are happening.
Is there no other way but to restart?
Imagine other players playing normally, but one or two players getting stuck due to a region bug and needing to restart the entire server
Can we restart bug region only?
You should be able to modify the Folia code and implement your own watchdog, you'll have to stop ticking that region, unload all teh chunks save and kick everyone on there online, this is pretty much what a watchdog behavior would be. You can implement this API yourself in Folia if you want, it's not by default in there. Killing the application specially on scenarios like this is sad. But hey, this is a workaround for the real problem... fix the plugins that cause 1000 mspt+. they are your issue.