RAM and "Read timeout" error

Discussion in 'Bukkit Help' started by cuddylier, Jun 7, 2012.

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


    The "Connect time out" isn't a problem, my server gets that at times. Where it says "Has the server time changed? Or is the server overloaded?" it means most likely that your server is overloaded. Try keeping all your saved data and removing all your plugins for short period of time, and if that isn't the problem, just install them all back and input the saved data back in. Respond back after you try this.
  2. I was told to try a java profiler because I have so many plugins removing each one and waiting 10 hours isn't ideal. Do you know anything about visualvm or know a ubuntu tutorial for it?

    Does anyone know of a tutorial on how to use visualvm on ubuntu or anyone interested in making one?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 26, 2016
  3. Bump, ram seems to rise about 20kb every 1 second which means the RAM rises very quickly for some reason. Anyone any idea why this happens? My server is using insane amounts of ram, up to 10gb for no apparent reason.

    Anyone have any idea?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 26, 2016
  4. Offline


    Have you tried stopping your server, deleting the "session.lock" file in each world folder - then going into all your region folders and deleting any files that are just called "r" with no numbers at all in the filename?
  5. I have deleted all the old region files already. I have solved the "too many files" open error by just expanding my limit. The main problem now is the memory leaks, the ram rising to 10gb over a few hours.
  6. Offline


    Why does your main world have almost 7,500 entities?
    Has someone been spam-spawning boats/minecarts?
  7. My world is pretty big, not quite sure why it has that many.
  8. Offline


    So much misinformation in this post, its incredible.

    Read time outs are a result of your system getting overloaded. Its mostly a symptom. Can't keep up errors are most often caused by CPU or disk I/O being overtaxed. You should try to monitor your CPU usage, see if a single core is regularly spiking at 100%. Even if it doesn't stay there, that could be impacting.

    Your world may also be overloaded with entities - causing an incredible amount of CPU/Memory usage when the chunk with the entities is overloaded. Run the verbose option for Minecraft Region Fixer against your world. This is a non destructive method to see if your world/entity count in your world is healthy. Of course make backups (you have those, right?). This alone could be the reason your server up and dies.

    Stop messing with your start script. It is very likely fine with just:
    java -Xms1G -Xmx7G -jar craftbukkit.jar
    Be very careful allocating more. If you only have 10GB, you NEED to leave at least 2GB for your OS.
  9. Thanks for replying. I have 16gb in total for my server computer. I have been using visualvm the last view days and CPU doesn't seem to be an issue. RAM appears to now be a problem, after like 9 hours, the RAM goes from less than 1gb usage with like 20 players on after a restart straight to 10gb after 9 hours. I have used Minecraft Region Fixer before while I had this problem and it says my world is totally fine, using the verbose option. I can try scanning it again and see.
  10. Offline


    I like scanning my world with Minecraft Region Fixer on a periodic basis, to provide a health check for my world. If that's not the case, you could very well have a plugin that is running amok, and you know the drill with that - remove them and test.
  11. I have 50 which is the issue, it's disruptive for 60 players :( I'm still trying a profiler.
  12. Offline


    Good luck, I'm not fond of visualvm for memory profiling. Hard to decipher. When I ran into the same issues, I had to resort to the disruptive change. Was the only way I could track it down.
  13. Does /stoplag delete minecarts and boats?

    I just did /stoplag and killed 7k mobs and the ram did not even budge after 10 minutes, it continued rising.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 26, 2016
  14. Offline


    based on what evidence?

    I'm using towny and chestshop (plus about 30 other plugins) and with 25-30 online, I'm using MAYBE 2g-3g of ram,average.
  15. Offline


    based on towny and chest shop always are growing and adding more and more data most plug ins are set on what they do
    i use towny and chest shop so i know a little about them as your server grows and adds residents chest shops and just all around chests placed by non residents will cause more memory used by these plugins
    but you use towny and knew this already
    and the original op was asking about his plugins and yes the most memory used by his plugins is towny and chest shop
  16. Offline


    Residents and towny data is stored in SQL (at least I use SQL), and isnt called until its needed upon, its not like its all stored in an array loaded in memory and grows in size 10 residents with 30 people on, or 10,000 residents with 30 people on, the memory footprint of towny is no larger or small of any noticeable degree. as 9.970 of those residents its not caring about the data stored in flatfile or SQL unless its called upon.

    and chestshop of all things compared, is a tiny footprint of memory, just to test, I started up the test server with 300ish chestshops, and took out the plugin jar and restarted and checked..memory usage difference is negligible.

    and I fail to see how chests placed by residents vs non residents makes a difference, as its a onBlockplace event called to see if they can. after that its just a 'chest' like any other..and same code is called to see if its locked if they are or aren't a resident.
  17. Thank you for your knowledge. The weird thing is that my ram could be 2gb with 40 people after a restart but with 30 people it could be 9gb, player numbers do not seem to matter one bit whatsoever, there doesn't seem to be a correlation. The RAM just rises at a fast rate constantly until it uses all 10gb after around 8-9 hours and crashes the server.
  18. Offline


    Yea its really weird.

    Now I'm not saying towny isn't a resource intensive plugin. but I don't think in practice its the culprit. as Ive had as many on as you at once, and my members constantly moving/claiming/unclaiming plots..and never reached anywhere NEAR your ram usage.

    and I got some really heavy plugins: Dynmap rendering 4 worlds, Ore obf, Spout, Towny, Logblock, McMMO, to name just a few. (about 30-35 in total)

    So its definitely something else fishy going on.
  19. The ones I have in common of those is log block and of course towny. That's it.

    Just checked the profiler, it's basically useless, there is no obvious plugins in the list at all.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 26, 2016
  20. Offline


    There is an option called java.customopts= in the McMyAdmin.conf file that will let you add these arguments. Just leave out the min max ram stuff and let McMyAdmin handle that.

    I couldn't say which plugin is causing this but no doubt it is a plugin that is causing it. If you haven't done so yet Your best bet is to figure out what changed since the problem started and also start looking at the bukkit dev pages for all your plugins and see if other users are reporting similar problems. I have had problems with read timed out and errors like yours before because of what I think was a problem with my map but it was a long time ago and I don't recall it using lots of memory like this so I don't think this is the problem.
  21. The thing is I only added a few plugins and they were removed. This problem has only really happened as my server has been expanding. I've already got a garbage collector added, all it does is lets the server last for 9 hours instead of 4.
  22. Offline


    Run your world through Minecraft Region Fixer - see if you have too many entities loading in a chunk.

    Also try using the plugin "TheCleaner". It is meant to stop entity buildup, which is often what causes these kinds of problems.
  23. I did /stoplag and it did absolutely nothing to the ram, is this basically not killing all the mobs?
  24. Offline


    Only in the chunks that are currently loaded. This could be caused by an issue in an unloaded chunk and only crashes your server when that chunk loads. By the time that happens, the /stoplag command is much too late to help you.
  25. I see, thanks.

    Tonight, I removed a lot of plugins. I have narrowed the plugins down to this

    Plugins (39): WorldEdit, BukkitCompat, SayAlias, Buycraft, MCTelnet, Vault, LogBlockQuestioner, PermissionsEx, Multiverse-Core, SimpleHelpTickets, LogBlock, Questioner, LWC, SpartanShout, TreeAssist, WorldGuard, Jail, MineBackup, PreciousStones, Honeypot, BKCommonLib, mcbans, PlayerFlow, mcMMO, AutoAnnouncer, Essentials, Factions, Towny, EssentialsSpawn, Multiverse-Portals, VanishNoPacket, Multiverse-NetherPortals, BOSEconomy, AutoRank, Register, NoLagg, ChestShop, TownyChat, AntiCheat

    The memory leak still happens with these, so it must be one of them. I only added NoLagg but it doesn't help. Any suggestions from this smaller list?

    Here is the /gc command, is the number of loaded chunks high?

    23:57:56 CONSOLE: [INFO] Maximum memory: 10,231 MB
    23:57:56 CONSOLE: [INFO] Allocated memory: 10,175 MB
    23:57:56 CONSOLE: [INFO] Free memory: 2,227 MB
    23:57:56 CONSOLE: [INFO] World "world": 96901chunks,8246entities
    23:57:56 CONSOLE: [INFO] Nether "world_nether": 1517chunks,171entities
    23:57:56 CONSOLE: [INFO] World "world_the_end": 505chunks,124entities
    23:57:56 CONSOLE: [INFO] World "pvp": 507chunks,140entities
    23:57:56 CONSOLE: [INFO] World "pvpworld": 4171chunks,1073entities
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 26, 2016
Thread Status:
Not open for further replies.

Share This Page