Hello guys,
Was trying to resolve my problem since I've started my modded server. Was running a vanilla server for months, then I've decided to swap to modded ones. Anyway. Had no high enitity count issues with my vanilla, whatsoever. Both maps are the same size, same layot, etc. Of course my modded server would have higher entites, thats normal tho.
But, what I've noticed was until the first automated restart - oh yeah, got scheduled restart 6AM each day - the entity counts were okay. Then after the first server restart the entities were +10k, next day again, ant again, and again. After each restart the entities jumped +-10k.
Just done a restart manually, and I've accidentally noticed that the Raidable bases would not despawn any of the bases. So I think, but might be wrong, these bases are messing up the entity counts. I have 15 raidable bases set all around the map, so the 10k can be true in this case.
What you guys think about this? Can you see any solution for this? Or even to despawn all bases before the server actually shuts/restarts?
Thanks a lot for reading my problem, have a nice day! :)
Phoenix
Possibly creating high entity count?Fixed
hi, the bases should not persist through a restart as they are removed from the save list while the plugin processes the base after it's pasted via CopyPaste
Hiya, yeah. Once the server is up and running, the bases are physically not spawned, but is there any chance to that they still stored somewhere as entities? This is the only thing I can think of regarding my raising entities number. Thanks a lot for your quick answer mate.
I'm not sure, but I don't think so. If they're not spawned then it shouldn't be counted. The best solution would be to use a plugin that can tell you the counts of all entities
https://pastebin.com/GZmeNfM2
Save as EntityReport.cs and use the entityreport command in the server console. It will cause some lag, but this will output each entity and its count
Thank you man, will have a look once got home! Appreciate your help!!!
no problem
If you look around the posts you will see that there are a lot of questions regarding high entity count , they have been slowly building up (as is ram usage) for the last few months but no one seems to know why.
nivex@Rhialto has done some digging on this, but I'll let him reply if he wants to
I have read all his posts regarding magicloot (which i dont have) but it doesnt answer the questions, i have had the same plugins on the server for several years but this year the entities are steadily increasing by at least 12000+ a day, I used to finish at about 300thou just before a wipe now its over 500thou+ , I have decreased entities but they still build up, I used to run the server on 6gb. then 8gb , then 10gb now 16gb and am running at 55% in not even a full week of running.
He was able to find out more information regarding this, so hopefully he can comment on it
Oh wow, that would be nice, to see whats-what. It seems to build up after each restart. pookins, u have regular restarts too?
what would sometimes happen to me, is the following, the server restart procedure unloads all the plugins, (copy paste included) and if you have some really big raid bases, the server would shutdown (and save right before it) and end up with partially collapsed raid bases on it. I use timed execute to unload raid bases a few minutes before the planned restart. But i also have some really big bases on my server, the small ones are super fast to despawn, so maybe that helps maybe not.
hopefully the update will help solve that issue, phatblinkie. I did rewrite how the bases are despawned. be sure to read the update notes before installing as there's been some important changes
So, some Items in the game are actually made up of two distinct objects. An Item object and a HeldEntity object. The Item is the thing in your inventory or hotbar, the HeldEntity is the thing in your hands. Think of things like guns, syringes, keycards, water bottles, etc. You can’t see it in your own hands, but if you activate a deployable, other players will see a building plan in your hands. That too is a HeldEntity called “planner.prefab”.
Items in containers are just simple basic objects, they don’t actually store that much data, just things like quantity, skinID, a unique ID, condition, etc. They are not entities, but they do store references to entities which are associated with them such as the Item’s HeldEntity (if it has one).
When the game saves, all it does is go through all the entities in the saveList and serialize their important data and write that serialized data to a file. If it isn’t an entity, it doesn’t get saved directly. Items are not entitys, so they are not saved directly. Instead, Items are saved by the entities that contain them. For example, a Large Wood Box has a list of Items inside it, and that list gets saved as part of that entity.
The problem is if an Item with a HeldEntity is in a container which isn't in the saveList, the HeldEntity gets saved but the Item doesn’t. When the game loads, it loads the HeldEntitys but it can’t load the Items that used to own them because those Items were never saved. Then you get a situation where those HeldEntitys exist in memory and the save files, but they can never be destroyed in normal gameplay since the Item is responsible for killing the HeldEntity.
I haven’t tested Raidable Bases so I can’t say for sure if it is victim to this kind of entity leak. If the plugin Items with HeldEntitys inside of storage containers which are not in the game’s saveList, it could very well be a problem.
You say the ent count is going up by 10k per restart. Check if those 10k ents are mostly of type HeldEntity. Do you see a high count for planner entities? Like this:
[Entity Reports] assets/prefabs/tools/planner/planner.prefab: 5100Keep in mind, the vanilla game leaks HeldEntitys too, since all the autospawned loot containers are not saved either. If you have a large map with lots of loot crates, at least 1,000 of those orphaned entities will be from that.
(words in bold indicate actual classes)
Oh wow, this post is a gem, tbh as I am looking for some explanation or anything related to the issue, but found nothing really. Thanks a lot, much appreciated. Is there any solution for this? Or how we can get it all sorted, any ideas?
[Entity Reports] assets/prefabs/tools/planner/planner.prefab: 5100
I used to seet this yeah, but more or less when they being killed by the server? Yeah, I have got a 4.5k map, with 15 variable raidable bases and 15 Treasure Hunt Events. So there are some boxes all around the map. Plus players, but I wouldnt count players related stuff yet, as we 3 of us, and only me playing it daily. :D LOL
Well, not too sure what I can really do toget these "hanging" entities off the server as they keep spamming. Man, I ahve had 800.000 entities on wipe day (monthly wipe), and it was only me playin. Okay, okay, I was doing weeeelll too much as was testing all, but yeah. 800.000 entities, 1 player. LOL
Right now I have 123-125.000 entities, week after the wipe. Started on 45.000ish. So yeah, it is daily +-10.000 after each restart. So confusing, as it always happens after restart. And yeah, yesterday I have noticed that Raidable Bases wont despawn anything on restart, so I think all that data is just hanging around somewhere "in the air" and system would count them as entities? At least this is my thinking about the story, as there is no really other way to get that many entities from other source tbh.
Thanks a lot again! :)
- 1
- 2