Minecraft Server crashes a lot because of OutOfMemory Error?

Lu
- in Textures
17

My server crashes a lot because of OutOfMemory Errors. No matter how much memory I allocate to each server. Everyone crashes after a while, which is why I've put commands into the Start.sh script, that the server automatically restarts. Problem is only when players play on the server and the server reboots is stupid. I just "patche" the server, so to speak, but do not fix the problem because it just does not work. No matter how much, how little and which script I use, the server crashes after 5-10 minutes and restarts (currently because of my script as mentioned above).

This is a bungee cord server. I hosted the Debian 8 server at Contabo and run the Minecraft server on the Debian 8 server. The funny thing is that the server often stays on. Every server is loaded and you can join it. After some time, but then something with heap space, although everything has already been loaded. The Debian 8 server has as far as I know 14GB. Server I have a total of 20 (BungeeCord Server). Do I need to update Java, downgrade / upgrade the Debian 8 server, or what do I have to do? I've been doing this almost every day for 12 months, but the problem remains.

Here is the error message again:

java.lang.OutOfMemoryError: Java heap space

at net.minecraft.client.renderer.texture.TextureAtlasSprite.func_147964_a (TextureAtlasSprite.java:206)

at net.minecraft.client.renderer.texture.TextureMap.func_110571_b (TextureMap.java:169)

at net.minecraft.client.renderer.texture.TextureMap.func_110551_a (TextureMap.java:90)

at net.minecraft.client.renderer.texture.TextureManager.func_110579_a (SourceFile: 72)

at net.minecraft.client.renderer.texture.TextureManager.func_110580_a (SourceFile: 61)

at net.minecraft.client.renderer.texture.TextureManager.func_130088_a (SourceFile: 52)

at net.minecraft.client.Minecraft.func_71384_a (Minecraft.java:523)

at net.minecraft.client.Minecraft.func_99999_d (Minecraft.java:815)

at net.minecraft.client.main.Main.main (SourceFile: 103)

at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke (Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke (Unknown Source)

at java.lang.reflect.Method.invoke (Unknown Source)

at net.minecraft.launchwrapper.Launch.launch (Launch.java:134)

at net.minecraft.launchwrapper.Launch.main (Launch.java:28)

ta

What are the start parameters, so what's in the start.sh in there?

Fl

https://www.spigotmc.org/...A1.283181/

The disks at Contabo are very slow because there are probably too many VMs on a hard disk. Contabo also has very bad to no DDoS protection. And Minecraft is mainly running on a CPU core which is why you do not get much.

Contabo is not good for Minecraft.

The link above and sometimes the plugins can help you understand.

Lu

While true; do

java -Xmx1G -Xmx1G -XX: + UseG1GC -XX: + UnlockExperimentalVMOptions -XX: MaxGCPauseMillis = 100 -XX: + DisableExplicitGC -XX: TargetSurvivorRatio = 90 -XX: G1NewSizePercent = 50 -XX: G1MaxNewSizePercent = 80 -XX: InitiatingHeapOccupancyPercent = 10 -XX: G1MixedGCLiveThresholdPercent = 35 -XX: + AggressiveOpts -XX: + AlwaysPreTouch -XX: + ParallelRefProcEnabled -Dusing.aikars.flags = mcflags.emc.gs -jar spigot.jar

done

That's the whole Start.sh script from almost every server. For some I entered 1G, 2G or 4GB at the beginning.

ta

If you say you have 20 servers running on it, that means the 20 servers are running at min / max 1GB memory. Then it is clear that this does not work ;-)

Besides, actually it is enough if you give the starting parameters -Xmx and Xms, you do not really need the rest. And leave the garbage collector alone. Unless you know exactly what you are doing.

Lu

Okay, but how am I supposed to do that with the 20 servers that run the 20 servers and nobody crashes?

ta

You need more memory

Lu

Thank you. Have it done reasonably now. But despite everything, still crashes, but less than before. I have now registered on each of the 20 servers 400M, which is not very much, but it was worth a try, if it works so synonymous if a lot of free memory 12GB are free. 400x20 = 8GB. Have left the 4G for other things, such as the MySQL database, etc. What is not great (maximum 2GB). So have 2GB still so free. However, it still crashes, even if I allocate so little memory to the servers and I have a lot of memory left, it still crashes.

ta

Then 400 MB are just not enough. Then go get a second server or more memory. What do you need so many servers for?

Lu

Have "games" on the server. So homemade, with several plugins. If I were to run it all on a server (it's currently BungeeCord) I would probably have over 200 plugins on a server (lobby). In addition, I find BungeeCord more ordered, lighter, etc. If I move all this to a server, I would have to change versions of the other servers, update plugins, plugins if necessary Renter, because they do not work in the version and import the worlds. That would take a long time, which is why I have been doing this for 3 years with BungeeCord. At the beginning (3 years ago) a lot of things have funnily worked. Then I made an update from the Debian 8 server and first came from what (proxy…). Somehow I managed that too, but when I got an update of Debian 8 again, I did it and now I have the "Java Out Of Memory Error". Also, I do not quite understand what I'm supposed to do on the server right now. Should I allocate more or less RAM to each server? Have done that many times and it crashes anyway.

ta

The JVM throws the error if it can no longer reserve memory. That means you'll have to allocate more memory to your server and then more to the servers. Check which servers are crashing and allocate more and others a little less.

Lu

Yes, with the assignment of the individual servers, I have already done. Only I can't solve the problem at the moment, because probably many of the servers (because of more plugins) need the 1GB to 3GB and 20 servers. Even if I would assign 1GB to each server, I would already be over the limit of 12GB. Then I would have a total of 20GB, but the server, which is hosted at Contabo, does not have. Do you have any other option besides leaving out the bungee cord? The servers crashing one behind the other, but at intervals. First it is for example the lobby, then another server until almost everything has crashed and I have to reboot.

ta

You can just take another server. BungeeCord supports this. Do you think the big networks only work with one server?

Lu

Of course not. With my server, it is just the case that each server (19 servers) is connected to the BungeeCord server (1 server). With Contabo one could take a server to it, but that costs everything also monthly something. Is not there another possibility? Making a second BungeeCord server would not help because they are running on a server at Contabo and it only has 12GB and you should assign something to the BungeeCord server.

ta

No, if you say that some servers need up to 3 GB, then you need more speakers. Then just write Contabo a support message and tell them that you need more memory. If they do not do that, then you have to change the hoster. I use, for example https://www.ngz-server.de/ not to host Minecraft, but my own games ;-)

Or you go to Hetzner and get you since a big server and as far as the monthly costs. That's just how it is when you do something like that. Either you run a business to cover the costs or you pay for it yourself.

Lu

Is that really possible with the Contabo support? The offer more, but that costs more. Do you mean that now that you ask the Contabo support and then get free memory to do so? Or I got it wrong.

ta

No, of course it costs more. But you said that they offer only 12GB. If you need more, you need to contact support.

Lu

Okay, I'll take a look.