CitizensDev / Citizens2

Citizens - the premier plugin and API for creating server-side NPCs in Minecraft.
https://citizensnpcs.co
Open Software License 3.0
602 stars 317 forks source link

Spigot: Sentry Range >75 causes console spam #418

Closed Formula350 closed 9 years ago

Formula350 commented 9 years ago

Server:This server is running CraftBukkit version git-Spigot-044d928-e8c6403 (MC: 1.8.6) Plugins: Citizens v2.0.16 (build 1241) Sentry v1.8.5 (build 28)

The Spam:

[13:02:18] [Server thread/INFO]: Formula350 issued server command: /npc spawn
[13:02:18] [Server thread/WARN]: Filtered out large getEntities call 153,172 236,172
[13:02:19] [Server thread/WARN]: Filtered out large getEntities call 153,172 236,172
[13:02:19] [Server thread/WARN]: Filtered out large getEntities call 153,172 236,172
[13:02:20] [Server thread/WARN]: Filtered out large getEntities call 153,172 236,172
[13:02:20] [Server thread/WARN]: Filtered out large getEntities call 153,172 236,172
[13:02:21] [Server thread/WARN]: Filtered out large getEntities call 153,172 236,172
[13:02:21] [Server thread/WARN]: Filtered out large getEntities call 153,172 236,172
[13:02:22] [Server thread/WARN]: Filtered out large getEntities call 153,172 236,172
[13:02:22] [Server thread/WARN]: Filtered out large getEntities call 153,172 236,172
[13:02:23] [Server thread/WARN]: Filtered out large getEntities call 153,172 236,172
[13:02:23] [Server thread/WARN]: Filtered out large getEntities call 153,172 236,172
[13:02:24] [Server thread/WARN]: Filtered out large getEntities call 153,172 236,172
[13:02:24] [Server thread/WARN]: Filtered out large getEntities call 153,172 236,172
[13:02:25] [Server thread/WARN]: Filtered out large getEntities call 153,172 236,172
[13:02:25] [Server thread/WARN]: Filtered out large getEntities call 153,172 236,172
[13:02:26] [Server thread/WARN]: Filtered out large getEntities call 153,172 236,172
[13:02:26] [Server thread/WARN]: Filtered out large getEntities call 153,172 236,172
[13:02:27] [Server thread/WARN]: Filtered out large getEntities call 153,172 236,172
[13:02:27] [Server thread/WARN]: Filtered out large getEntities call 153,172 236,172
[13:02:28] [Server thread/WARN]: Filtered out large getEntities call 153,172 236,172
[13:02:28] [Server thread/WARN]: Filtered out large getEntities call 153,172 236,172
[13:02:28] [Server thread/INFO]: Formula350 issued server command: /npc despawn
[13:02:53] [Server thread/INFO]: Formula350 issued server command: /
[13:02:54] [Server thread/INFO]: Formula350 issued server command: /
[13:02:55] [Server thread/INFO]: Formula350 issued server command: /
[13:02:59] [Server thread/INFO]: Formula350 issued server command: /npc spawn
[13:02:59] [Server thread/WARN]: Filtered out large getEntities call 153,172 236,172
[13:03:00] [Server thread/WARN]: Filtered out large getEntities call 153,172 236,172
[13:03:00] [Server thread/WARN]: Filtered out large getEntities call 153,172 236,172
[13:03:01] [Server thread/WARN]: Filtered out large getEntities call 153,172 236,172
[13:03:01] [Server thread/WARN]: Filtered out large getEntities call 153,172 236,172
[13:03:02] [Server thread/WARN]: Filtered out large getEntities call 153,172 236,172
[13:03:02] [Server thread/WARN]: Filtered out large getEntities call 153,172 236,172
[13:03:03] [Server thread/WARN]: Filtered out large getEntities call 153,172 236,172
[13:03:03] [Server thread/WARN]: Filtered out large getEntities call 153,172 236,172
[13:03:04] [Server thread/WARN]: Filtered out large getEntities call 153,172 236,172
[13:03:04] [Server thread/WARN]: Filtered out large getEntities call 153,172 236,172
[13:03:05] [Server thread/WARN]: Filtered out large getEntities call 153,172 236,172
[13:03:05] [Server thread/WARN]: Filtered out large getEntities call 153,172 236,172
[13:03:06] [Server thread/WARN]: Filtered out large getEntities call 153,172 236,172
[13:03:06] [Server thread/WARN]: Filtered out large getEntities call 153,172 236,172
[13:03:07] [Server thread/WARN]: Filtered out large getEntities call 153,172 236,172
[13:03:07] [Server thread/WARN]: Filtered out large getEntities call 153,172 236,172
[13:03:08] [Server thread/WARN]: Filtered out large getEntities call 153,172 236,172
[13:03:08] [Server thread/INFO]: Formula350 issued server command: /npc despawn

The Cause: (Note: Sentry's target must be set to ENTITY:PLAYER, unknown what impact other target types play in this issue) When a Sentry's Range is set to >75 _OR_ when a sentry doesn't appear to be able to see anyone in range if their chunk is loaded. This ONLY happens when the Range is set to something from default, and only came up as a result of moving to Spigot. Prior to this I was running 1.8-R0.1 with the last supported versions of Citizens and Sentry and never experienced this issue, leading me to believe this is a Spigot-exclusive issue, but I have not used 1.8.6 or .7 CraftBukkit yet to confirm.

Attempted fixes: Changing the Spigot.yml settings under entity-tracking-range: from their defaults to 100 and then 200, changing the Entity type from Player to Zombie, tried different worlds (am using MultiVerse), none of them worked.

Steps to Reproduce: Run a default Spigot Bukkit YMLs /npc create /trait Sentry /sentry target add ENTITY:PLAYER /sentry range 90 <wait approximately 30sec> Cue the console spam. /sentry range 70 Console spam ceases.

Prior to this we were having no basically no problems with running their range set at 100, but those were also with versions prior to the Citizens move to only support 1.8.3+ and after making the move to 1.8.6 a couple days ago is the first time I've updated Citizens in a couple months. Nevertheless, we use the Sentry to create quest bosses, some of them in fairly large arenas where we don't want the players to be able to go out beyond the NPC's range then just pick them off with ranged attacks.

Admittedly I'm not 100% confident that it isn't an underlying Spigot config option I've overlooked, but what I can confirm is that the console spam is caused by Sentry, and is triggered by the Range setting.

Any other details I can provide, let me know. Thanks, -Formula350

Talamar1 commented 9 years ago

There is a max limit in the Citizens config to prevent server lag when scanning large areas. Change that limit, you servers performance may very....

Talamar1 commented 9 years ago

I was... kind of right. It is a max loop set in Denizen's config.yml (since Sentry now relies on Denizen).

Formula350 commented 9 years ago

Oh, hmm ok. I had to disable Denizens due to an error that prevented it from starting. I'll give it another go, see if I can get that working. We hadn't been using Denizens anyways but wanted to give it a go after finding out you can make custom recipes

Thanks for the tip. I'll let you know how it pans out... -Form

EDIT: Alright, managed to get Citizen, Sentry, Denizen (build 1578), Depenizen (build 251) to start up error-free. Is this the config setting you're referring to, @Talamar1 ?

  Proximity:
    Enabled: false
    Cooldown: 1s
    Range: 10

Because this is the only thing that specifies MaxLoop, but it's listed as for the "While" flag/trigger:

  While:
    # how many times the WHILE command can loop before it gives up
    # Set to 0 for infinite
    Max loops: 10000
mcmonkey4eva commented 9 years ago

@Talamar1 u wot m8 none of that is accurate.

@Formula350 it's the new spigot settings that cause it. Just boost the limits and you're good.

Talamar1 commented 9 years ago

I don't see a setting in spigot @mcmonkey4eva (fresh build on test server).?

Formula350 commented 9 years ago

@mcmonkey4eva Boost the entity-tracking-range: to something really high then?

mcmonkey4eva commented 9 years ago

I have no idea what setting it is, or if it's even a publicly visible setting >.> I'll go ask

mcmonkey4eva commented 9 years ago

It is not, in fact, editable, Spigot is bastards. I'm bugging them about adding a config option.

Formula350 commented 9 years ago

haha Awesome, thanks :)

I also just noticed today that you guys added Item_Frames and ArmorStands as NPC types... :bow: We have a weapon that sends a shockwave along the ground and explodes when it reaches an entity, which can bypass worldguard, so it knocks frames off the walls and can relocate NPCs; however, not Item Frame NPCs! So how thankful I am, you have no idea! lol EDIT: Well, if that ain't just annoying :sob: On my Test Server, the Item Frame NPCs aren't being broken by the weapon in question. On the _main_ server, they get sent skywards :( Baaaaaack to the drawing board.

Formula350 commented 9 years ago

Any word on this being added to Spigot/CB yet?

1d 9hrs of server uptime and my log is 9MB. During peak times the console is useless due to it being a wall of Filtered out large getEntities call spam :frowning:

mcmonkey4eva commented 9 years ago

Have you... not just set the range lower yet?

Formula350 commented 9 years ago

For most of the NPC "Bosses" that may work (based on arena size), but I know a few of them need over 50, otherwise they'll be within Bow range but not charge the player.

And my initial reports were on my test server, by myself, but when I tried to set it lower than 70 on the main server the spam persisted. I'll try and figure out the number needed to make the spam cease.

Formula350 commented 9 years ago

Ok, after looootss of painful work, I've sorted it out. :\

Each of the Sentry NPCs required a player (yourself may work but I didn't want to in case Op somehow skewed results), monitoring console, and having them travel to each "Boss" area. From there I would select that NPC, check what it's Range was set to (/sentry range) and then adjust from there. Go too high and it'd start to spam, at which point I'd back the range off by 5 until it stopped (to be safe, maybe back off an additional 2 just to be safe).

Sucks you can't "set it higher than needed and walk away" anymore but at least the spam has stopped! :relieved: