World loading makes server crash?

  • World loading makes server crash?

    I have a gameserver which has now been running for about 6 weeks.

    More or less randomly it seems to start lagging for everyone and then crash. It is most frequent when a lot of people are on, but I have also managed to crash it solo, once I was out exploring the world.
    Another player has noted that the crashes tend to happen when someone is out exploring unknown regions.
    It doesn't seem to be consistent though, since I have explored unknown region several times without any problems.
    I don't remember it ever happening right after restart either, it always seems to be at least a an hour or two after restart.

    So my question is:
    Is there a known issue with world loading in the game which can cause this?
    Or with one of the plugins (AreaProtection, AnimalBreedMaster, Teleportation)?
    Or anyone who knows what else it might be?

    I have cut down on the plugins which seems to have helped, but it still sometimes occur.
    Also I once noted that the server db got 'locked' when another player seemingly tried to run commands in the console without proper permissions etc.
    Reloadplugins worked in that instance, which is not the case in the above mentioned lagging issue.

    Will appreciate any help :)
  • I am trying that but some plugins can't be turned off and still make the server viable, such as area protection.
    ABM and teleportation has been used on many different servers, so I would be surprised if they were the problem, but of course the combination of these 3 could be causing problems. But could I really be the only one running a server with this combo? And if I am not, and the others aren't haven problems, it would indicate it isn't the plugins, which are the problem. This - I think - is backed by the fact that reloadplugin doesn't help at all with this error. I could have made a mistake in setting up the plugins of course, but I would expect that to cause more consistent problems.

    Previously I tried uploading an error log, but apparently the errors in it could not explain something like this, so I haven't consistently checked it after.
    Although I do expect to do that next time, since the other plugin errors seem to have all but disappeared now.
  • What sort of "lags" do you mean exactly? Are you referring to actual lags, i.e. there is a high latency between the client and the server (desync, world takes ages to load, player sync not properly etc), or do you refer to performance issues (framerate, freezes etc)?
    If the server crashes (this shouldn't happen, so there is definitely something wrong), there should be either an "errorlog" or "hs_err_pid" file in the server directory - these files contain information about why the server actually crashed. If there is such a file, please upload it here ;) Alternatively you can upload a server log (from when the server crashed), these can be found in the "logs" subfolder.
  • well, the times I have been on it usually starts with the world taking a lot longer to load. Then it gets worse and seems to stop loading all together, and there are a one or more tears in the world (so to speak) or complete gray when moving to 'new' areas. This sort of seems the same as freezing except I can usually move around. This is around the time when there seems to be problems with saving too, people can't use the action f key and people throughout the game has to give up because it becomes impossible to effectively do anything at all.
    This is when I restart.
    The above usually takes maybe 10 minutes to play out.

    When I am not on the server seems to struggle for awhile and then sometimes eventually crash and restart. Haven't figured out when that happens exactly since I am not there to see it. Apparently the server has sometimes been down for hours in the sense that it hasn't been possible to log on or play.

    I added an error log in an earlier post from around the time the server becomes unplayable and right before I had to restart. But I have yet to figure out how to determine when an actual crash happens exactly. Sometimes I can guess from the player numbers and a query failure, but it will be estimated. I suppose there is a log entry somewhere, but I haven't looked for that yet, since it probably requires reading logs covering several hours frequently with several active players which adds up. I could try to see if I can find the last time, but otherwise my plan is to look more into next time it happens. As mentioned I think most of the plugin errors are gone, so this is probably the one remaining (more or less). Which should make it easier to narrow it down.

    And yes I have mentioned it to the host. They say it can't possibly be a server problem, since a restart always solves the problem. So it must be the plugins.
  • Stine wrote:

    They say it can't possibly be a server problem, since a restart always solves the problem

    Sometimes my car cuts out but it starts up again when I turn the key. It can't possibly be an engine problem as the car starts up when I turn the key.

    That's pretty much the same thing. I work with servers so it could be a memory issue, drive write issue, NIC issue, etc. But, having said that it possibly isn't that.

    Occam razor.

    You may have to remove the plugins except the protection one (as you said you need that one for your server to work). You could remove the Teleport and ABM for a 'test period'. If the server still crashes without these plugins my thoughts would go towards something dicky at the host.

    It's very hard for anyone to give any help without an error log. It just ends up with a lot of "try this try that", until someone suggests a world reset (don't do that! ;) )
    Medieval Realms - connect to server via
    Medieval Realms Website

    The post was edited 1 time, last by yahwho ().

  • Well, this indeed sounds like a serverside issue. Please post an errorlog or better a server log here, it will most likely give more information about what's going on there exactly ;)

    Stine wrote:

    They say it can't possibly be a server problem, since a restart always solves the problem.
    This isn't entirely true. If the server runs out of resources, for example, a restart always solves the issue. This doesn't necessarily mean that it's related to a plugin. Of course plugins can still be responsible for performance issue, but to find out what's going on there, please upload a server log here (or alternatively send it via PM to me)
  • Okay, we are 'in luck'. There were server problems last night, seems people haven't been able to log on or play for hours. It doesn't seem to have been a regular crash, but was instead rectified with an automatic server restart in the morning.

    According to a player it starts around 22.30 and I can see in the log that another player experience rendering problems around 22.42, then has problems logging on. Over the next 15 minutes it evolves to create problems for all players it seems, and then people log off. As far as I can see no one can then log on again.

    Since there is chat in the log I will send it via pm.

    Thanks for the help so far :)
  • Found the error logs - there are 8.

    Content is a variation of:

    Rising World - - Dedicated Server
    Windows Server 2016 10.0 Java 1.8.0_181 (x86) Memory: 1037 MB
    2019/02/10 05:00 PM
    RW SERVER: Fatal error occurred!
    java.lang.OutOfMemoryError: Java heap space
    at org.sqlite.jdbc3.JDBC3PreparedStatement.addBatch(
    at y.c.f(SourceFile:392)
    at C.d.f(SourceFile:123)
    at D.z.execute(SourceFile:42)

    So looks like it is a lack of memory error.