New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPC's Spawning/Despawining repeatedly until server crashes #1443

Closed
brooklynstarr opened this Issue Mar 16, 2018 · 11 comments

Comments

Projects
None yet
4 participants
@brooklynstarr

brooklynstarr commented Mar 16, 2018

Hi,

This issue started roughly two weeks ago, and I finally sat down today to troubleshoot. It appears that, whether anyone is logged in or not, Citizens2 continually spawns and de-spawns NPC's repeatedly (about twice a minute) causing a high amount of lag and thrashing from loading and unloading of chunks in memory; I use a chunk unload tool that doesn't help much in this case, because as soon as the chunks are unloaded, they're reloaded again. This happens for several hours until finally the server crashes.

I figured it out by first disabling all citizens related plugins such as denizen and npcdestinations, then finally Citizens. Disabling Citizens2 stabilized the server. I restarted with Citizens2 and set "keep chunks loaded" to true, then when I restarted Citizens2, the issue went away. Note that now all chunks with citizens in them stay loaded. It's okay, but not how I prefer to manage the server.

If you want to look at an example of the errors (taken just before the server crashed) you can see it here: https://pastebin.com/ZweH4Gar. Bare in mind I don't think these errors matter more than just showing that the NPC's are spawning and triggering errors in other plugins, this is normal. If I disabled any of these other plugins (mobhunting, herobrine, to name a few) the server still crashes, only difference being I don't see any error messages.

Help resolving this mystery appreciated.

Thanks.

@mcmonkey4eva

This comment has been minimized.

Member

mcmonkey4eva commented Mar 16, 2018

The error log should probably be reported to MobHunting / Herobrine plugins (the issue is contained within those plugins).

Citizens shouldn't be just loading NPCs at random in bulk... it may be an unexpectedly connected plugin is accidentally triggering some misbehavior in Citizens - can you replicate this on a server with all other plugins gone (as in, have Citizens as the one and only present plugin). If that doesn't replicate, would be helpful to see what other plugin might be needed to trigger the misbehavior.

@brooklynstarr

This comment has been minimized.

brooklynstarr commented Mar 16, 2018

I actually disabled both mobhunting and herobrine and still got the same issue, only it wasn't visible on the console. However I'll do it like you say and reset the behavior of the plugin not to leave chunks loaded. I'll get back to you with results.

@brooklynstarr

This comment has been minimized.

brooklynstarr commented Mar 16, 2018

it's up with just citizens. I'll have to wait a few hours, perhaps a day with it like this. Will follow up.

thanks.

@mcmonkey4eva

This comment has been minimized.

Member

mcmonkey4eva commented Mar 16, 2018

I actually disabled both mobhunting and herobrine and still got the same issue, only it wasn't visible on the console.
I meant... report the error log to them. The pastebin. Not the issue here, just that log file with errors in it. The relevant plugins will probably want to fix the issue that's causing those errors to appear.

@fullwall

This comment has been minimized.

Member

fullwall commented Mar 17, 2018

Citizens shouldn't be loading the NPCs after the chunk unloads, I'd say something else is making the chunk load, causing the problem.

@brooklynstarr

This comment has been minimized.

brooklynstarr commented Mar 20, 2018

My sentiments exactly, and it has always behaved well in all the years I've been using it, however only those chunks that contain npc's seem to be the ones that continually get reloaded. Changing the settings so that the chunks always stay loaded seems to resolve the problem, at significant TPS and memory cost. I've submitted the pastebin to the others as well, could be that some of my NPC's are mobs, but very few, and herobrine isn't active in the main world so it doesn't make sense- it's just being called as it does whenever citizen bearing chunks are loaded.

It's hard for me to test without other plugins as this causes users to log in and reek destruction. I'm setting up a test server to do some further troubleshooting but this will take some time. I'm working with other plugin owners as well and will let you know if I come up with anything significant and relevant.

Thanks.

@brooklynstarr

This comment has been minimized.

brooklynstarr commented Mar 24, 2018

Just to update, I've run the server with the other plugins removed (though not all of them) and there is the same starvation issue that occurs, though this time without any errors other than the starvation warnings, usually roughly six or seven hours after the server has been started. I'll note that this does not happen when all other plugins other than citizens (or those that depend on citizens) are enabled.

Not sure what to do or how to troubleshoot this further, so I'll relegate to just keeping the chunks loaded on a permanent basis as this is the only thing that prevents the server from becoming unresponsive after several hours.

Thanks.

@Noiknez

This comment has been minimized.

Noiknez commented Jul 8, 2018

After one years of investigation, I think I may have the same issue. I am still investigating
image

I will use the keep-chunk-loaded option to true if there is any change

@Noiknez

This comment has been minimized.

Noiknez commented Jul 8, 2018

Example of one support ticket :

edited in google traduction for compacted purpose

Jan 11, 2018

> Hello I am contacting you about the following message that we receive at least once a day at different times, we have done everything possible to optimize the server, however the server randomly blocks at 100% CPU. Is the problem on our side? cordially

Your server was automatically stopped by monitoring because of constant CPU / CPU over-consumption. Check the configuration / customization of the server to correct the problem.

 > A priori the server crashes by becoming unreachable + 100% of CPU consumption. It should try to connect this problem with players present in an area or performing a particular aciton.

Do you have an idea on your side?

> Ok anyway, it comes even when no player is present

> Do you have any idea of ​​what might continue to consume CPU in a constantly busy area? If you do not use a chunk loader or whatever, the only area permanently loaded is the spawn.
@Noiknez

This comment has been minimized.

Noiknez commented Jul 17, 2018

Activating the keep-chunk-loaded option don't change the problem

@mcmonkey4eva

This comment has been minimized.

Member

mcmonkey4eva commented Oct 12, 2018

@Noiknez Would need more information before we can suspect your issue is caused by Citizens. If you believe it is so, please open a new issue with reasons as to why.

@brooklynstarr there's not much we can do without any idea why that's happening - it sounds vaguely like something wrong in your world files causing too much reloading, but it's hard to say. If you can gather more information, please reply with it below so we can re-open the issue and investigate further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment