Please help! World files are open with multiple file descriptors?

Discussion in 'Plugin Development' started by ryanhamshire, Jul 13, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    ryanhamshire

    Hey guys I'm getting that "too many open files" error every few days on my server, where I run a few plugins, mostly my own. I got a list of all the open files on the server to make sure that nobody (plugins) was leaving any data files open, and I confirmed that. All the files currently open were .JAR files and .MCA (world data) files.

    But that leaves me wondering why I'm having this problem. I did notice something that to me seems strange. Many of the MCA files are open under several file descriptors. Is this normal for a Minecraft server? Is there anything I can do to reduce this problem? See below for a specific example of what I'm talking about.

    My guess is this somehow increases gradually over time, until my server can't open any sockets to let players on, so it's effectively crashed. Does anybody else have this problem? Any guesses about how this could be happening, or how I can solve it?

    File ID Type Device Size Node Name
    172uREG 8,18502579213168088service12322/world/region/r.0.1.mca
    225uREG 8,18502579213168088service12322/world/region/r.0.1.mca
    234uREG 8,18502579213168088service12322/world/region/r.0.1.mca
    273uREG 8,18502579213168088service12322/world/region/r.0.1.mca
    324uREG 8,18502579213168088service12322/world/region/r.0.1.mca
    389uREG 8,18502579213168088service12322/world/region/r.0.1.mca
    391uREG 8,18502579213168088service12322/world/region/r.0.1.mca
    431uREG 8,18502579213168088service12322/world/region/r.0.1.mca
    443uREG 8,18502579213168088service12322/world/region/r.0.1.mca
    490uREG 8,18502579213168088service12322/world/region/r.0.1.mca
    535uREG 8,18502579213168088service12322/world/region/r.0.1.mca
    612uREG 8,18502579213168088service12322/world/region/r.0.1.mca
    660uREG 8,18502579213168088service12322/world/region/r.0.1.mca
    682uREG 8,18502579213168088service12322/world/region/r.0.1.mca
    730uREG 8,18502579213168088service12322/world/region/r.0.1.mca
    735uREG 8,18502579213168088service12322/world/region/r.0.1.mca
    842uREG 8,18502579213168088service12322/world/region/r.0.1.mca
    969uREG 8,18502579213168088service12322/world/region/r.0.1.mca
    978uREG 8,18502579213168088service12322/world/region/r.0.1.mca
    1030uREG 8,18502579213168088service12322/world/region/r.0.1.mca
    1055uREG 8,18502579213168088service12322/world/region/r.0.1.mca
    1235uREG 8,18502579213168088service12322/world/region/r.0.1.mca

    As a hint, one of my plugins does sometimes force load chunks, but I generally later call chunk.unload(safe=true). I don't know if this could be related, but it's my only theory right now.
     
  2. some other players also have this problem,I think its an bug
     
  3. Offline

    ryanhamshire

    Meaning my bug, or a Bukkit issue, or a Minecraft issue? Are there any known workarounds?
     
  4. I think its an minecraft bug
     
  5. Offline

    ryanhamshire

    So, confirming this is a Vanilla bug, or at least, that's what Verrier (of CraftBukkit fame) thinks. There's no known safe workaround within Minecraft for now, so if you run into this, ask your hosting provider to increase your max open files.

    Note that some plugins can also cause this problem by not properly closing files, and in that case, you should disable the plugin and/or report the issue to the plugin developer. To determine whether this is a plugin problem or the Vanilla Minecraft bug, ask your hosting provider for a list of currently open files, then examine the contents. If you see lots of files open which are NOT *.mca files, then it's a plugin problem, and you should try to determine which plugins work with those specific files. Otherwise, it's a Minecraft bug and you should have your max files open limit increased.
     
    fromgate likes this.
Thread Status:
Not open for further replies.

Share This Page