Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to load/unload region while the folia server is running #175

Open
nyancat-hu opened this issue Dec 9, 2023 · 4 comments
Open

How to load/unload region while the folia server is running #175

nyancat-hu opened this issue Dec 9, 2023 · 4 comments
Labels
status: needs triage type: feature Request for a new Feature.

Comments

@nyancat-hu
Copy link

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

@nyancat-hu nyancat-hu added status: needs triage type: feature Request for a new Feature. labels Dec 9, 2023
@Spottedleaf
Copy link
Member

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.

@nyancat-hu
Copy link
Author

nyancat-hu commented Dec 9, 2023

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?

@HyCore
Copy link

HyCore commented Jan 27, 2024

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)

@PedroMPagani
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs triage type: feature Request for a new Feature.
Projects
None yet
Development

No branches or pull requests

4 participants