How to prevent server crash while flying with Elytra?

Solution 1:

If you want to keep that render distance there is one simple solution: Allocate more RAM. 20 Chunks of of render distance while flying with an Elytra will knock out your memory, especially when there are chunks being generated and not just loaded. You don't have to max it out so the CPU won't fry.

You can simply use these in the server's startup parameters:

-Xms[minValue] -Xmx[maxValue]

The server will then initially use the min value of RAM and may be use it up to the max value. You can choose the unit size, such as Mega- (e.g. 4048M) or Gigabytes (e.g. 4G). For example:

- Xms4048M -Xmx16192M

These would for example allocate at least 4GB of RAM and the server is allowed to use up to 16 GB. Using more RAM increases the CPU load, so you have to watch how far you can go with that.

Solution 2:

I've poked around a bit, and I think I have a few answers. You can either install a plugin that periodically unloads chunks (Such as Clearlag) so that the server doesn't become overwhelmed with the amount of chunks loaded. OR you can lower the MaxRenderDistance in the server config to reduce the number of chunks loaded.