PluginBugs / Issues-ItemsAdder

Repository used to keep track of issues of my plugin ItemsAdder
https://itemsadder.devs.beer
54 stars 21 forks source link

Too many open files #2972

Closed loshgg closed 1 year ago

loshgg commented 1 year ago

Terms

Discord tag (optional)

loshg

What happened?

After the server runs for about 3 hours or so, I get spammed in the console with the error message "Too many open files". Eventually, I restart the server, or it crashes, and player data is lost for the world. I have been back and forth with the support team at my MC host and here is what they have mentioned:

"The error is caused by a bug in the plugin reading too many files at once. You can track the issue here: https://github.com/PluginBugs/Issues-ItemsAdder/issues/2872"

However, looking over that GitHub report, I'm not sure if that exactly applies to this same issue. I am using Elite mobs which creates and disables worlds as well. However, even with no one on the server the bug still pursues. I'm very new to the whole MC server thing, so I'm sorry for not being able to explain this better. Any help on this would be VERY appreciated.

I did try to run my server for a few days without IA installed and the server ran smoothly. I love the plugin and have built most of my server around it so I really want to do everything possible to keep it.

Steps to reproduce the issue

  1. Have Itemsadder installed on server
  2. Let the server run for about 3 hours or so

Server version

Paper version git-Paper-60 (MC: 1.20.1)

After doing /version in my console, I just realized I am 85 versions behind. I'll have to contact my server host regarding this as my control panel shows me using the latest version. I still wanted to go ahead and post this issue in case the cause is coming from something else.

ItemsAdder Version

ItemsAdder version 3.5.0c-r4

ProtocolLib Version

ProtocolLib version 5.1.0

LoneLibs Version

LoneLibs version 1.0.25

FULL server log

latest-6.txt

Error (optional)

[Netty Epoll Server IO #0/WARN]: [io.netty.channel.DefaultChannelPipeline] An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.
io.netty.channel.unix.Errors$NativeIoException: accept(..) failed: Too many open files

Problematic items yml configuration file (optional)

No response

Other files, you can drag and drop them here to upload. (optional)

No response

Screenshots/Videos (you can drag and drop files or paste links)

No response

LoneDev6 commented 1 year ago

Never encountered this issue and it should happen on every of the 5000+ servers. This is very strange, ItemsAdder doesn't keep any file stream open after plugin loading, are we sure it's related to ItemsAdder itself?

loshgg commented 1 year ago

That's my confusion as well. I've looked into many other causes, and nothing I do seems to help the situation. Due to my ignorance, I've had to get a ton of support through my server host, and IA seems always to be their conclusion. At one point, I was specifically told that "The issue is likely from your itemsadder plugin affecting the chunk r.17.-13.mca". I've tried to delete the pregion files hoping that would fix a bad chunk, and that did not help either. I've attached a log from the OpenFileMonitor plugin if that helps. Unfortunately, I couldn't get a version right before a crash. If there is anything else I could provide to help decode this, please let me know. openfiles.txt

auyylaso commented 1 year ago

I actually literally just got that error yesterday but my issue is my ram in my server rack is dying. It for myself is a JAVA related issue when the memory on the system itself is entirely in use.

loshgg commented 1 year ago

Servererror serverram

Here are some more references (if it helps). I just logged into my server after 3 hours of it running. When I go to join it I am prompted with a "failed to connect to server" message. Additionally, my RAM will shoot up to about 85% and then crash moments later.

Here is the log from moments ago 2023-08-23-8.log.gz

loshgg commented 1 year ago

I got another server running and have been testing what could be causing the issue. After looking into it seems there are complications between the plugin Elite Mobs (similar to Mythic Mobs) and IA. With both plugins installed, the server will eventually open too many files. However, with either plugin disabled, the server runs smoothly. Currently, on my server, Elite Mobs has maps that are enabled and disabled once a player enters into a portal. It also has events like spawning certain mobs around the map at different times. Some of these include mobs with custom models. I'm not too knowledgeable in this space, but I think it has something to do with the IA region files.

I'll try to get a hold of the author of Elite Mobs as well and see if it could be something on their end. Please let me know if any of this information helps.

loshgg commented 1 year ago

openfiles_24_08_2023_23_50_35.txt

Here is a log from me trying to run the server for the last few hours. This is the most files I have seen so far in my openfiles log. It really seems like the itemsadder region files are causing the issue. Could there be something in the configuration that I'm missing?

LoneDev6 commented 1 year ago

I confirm it seems to be related to this bug: #2872 I'm going to do some extensive testing to see if I can find the source of the issue. Continue on #2872