Don't Starve Together

Don't Starve Together

New Boat Shapes
bridge_anchor and boat_world_collision_common appear to infinitely spawn
bridge_anchor and boat_world_collision_common appear to infinitely spawn. I was having performance issues on a server where I was seeing unreasonably high CPU usage (server was at 100% all from don't starve). I had the server admin run `CountEntities()` in the don't starve console to see what was going on. I noticed a _really_ high amount of bridge_anchor and boat_world_collision_common. I crossed my fingers and had them delete all the boat_bridge in the server and the CPU immediately dropped to a reasonable level (25% usage by don't starve). I imagine the 127 boat_bridge in the server weren't the actual cause, but actually the 4046 bridge_anchor and 2653 boat_world_collision_common.

I took a quick look at the mod lua files and I see where those items are spawned and I wonder if maybe they are spawned every time we start the server despite the fact that they may already exist? Meaning that every time the server starts one of those is created despite the fact that one already exists as described in the save file? The mod author of course probably knows the code better, could be something else :)

Another thing to note is that boat_hull_collision_common, boat_player_collision_common, and boat_item_collision_common are all at the right scale compared to the number of boats so those ones don't appear bugged.

Anyway here's the relevant snippet from the server logs, you can see the entities count (clipped for brevity), the command deleting all the bridge boats, and then the new entity counts.
... [00:13:03]: [(REDACTED) Player Name] ReceiveRemoteExecute(CountEntities()) @(-269.77, 59.85) [00:13:03]: Total entities: 34560 (awake 2391) [00:13:03]: No prefab: 234 [00:13:03]: Invalid entities: 0 [00:13:03]: inventoryitem_classified - 5326 [00:13:03]: bridge_anchor - 4046 [00:13:03]: boat_world_collision_common - 2653 [00:13:03]: evergreen - 2368 [00:13:03]: seastack - 2142 [00:13:03]: rock_petrified_tree - 1359 [00:13:03]: twigs - 1026 [00:13:03]: grass - 811 [00:13:03]: tumbleweed - 711 [00:13:03]: stinger - 674 [00:13:03]: twiggytree - 607 [00:13:03]: spoiled_food - 588 [00:13:03]: beefalo - 572 [00:13:03]: flower - 479 [00:13:03]: flies - 432 [00:13:03]: deciduoustree - 430 [00:13:03]: burnable_locator_medium - 411 [00:13:03]: poop - 365 [00:13:03]: evergreen_sparse - 303 [00:13:03]: bullkelp_plant_leaves - 273 [00:13:03]: bullkelp_plant - 273 [00:13:03]: trap_teeth - 264 [00:13:03]: ground_support - 260 [00:13:03]: waterplant_base - 206 [00:13:03]: waterplant - 206 [00:13:03]: rabbithole - 191 [00:13:03]: rabbit - 191 [00:13:03]: marsh_tree - 173 [00:13:03]: moon_tree - 164 [00:13:03]: fireflies - 160 [00:13:03]: wall_stone - 148 [00:13:03]: rock_ice - 140 [00:13:03]: rock_flintless - 134 [00:13:03]: wall_wood - 133 [00:13:03]: boat_hull_collision_common - 130 [00:13:03]: boat_player_collision_common - 130 [00:13:03]: boat_item_collision_common - 130 [00:13:03]: boat_bridge - 127 [00:13:03]: boat_plant - 126 [00:13:03]: saltstack - 126 [00:13:03]: rock1 - 125 <cut short for brevity> [00:14:56]: [(REDACTED) Player Name] ReceiveRemoteExecute(for k,v in pairs(Ents) do if v.prefab == "boat_bridge" then v:Remove() end end) @(-270.41, 60.20) [00:15:55]: [(REDACTED) Player Name] ReceiveRemoteExecute(CountEntities()) @(-271.68, 68.60) [00:15:55]: Total entities: 26839 (awake 2430) [00:15:55]: No prefab: 242 [00:15:55]: Invalid entities: 0 [00:15:55]: inventoryitem_classified - 5336 [00:15:55]: evergreen - 2369 [00:15:55]: seastack - 2142 [00:15:55]: rock_petrified_tree - 1359 [00:15:55]: twigs - 1027 [00:15:55]: grass - 811 [00:15:55]: tumbleweed - 711 [00:15:55]: stinger - 674 [00:15:55]: twiggytree - 607 [00:15:55]: spoiled_food - 590 [00:15:55]: beefalo - 572 [00:15:55]: flower - 479 [00:15:55]: flies - 432 [00:15:55]: deciduoustree - 429 [00:15:55]: poop - 365 [00:15:55]: evergreen_sparse - 303 [00:15:55]: bullkelp_plant_leaves - 273 [00:15:55]: bullkelp_plant - 273 [00:15:55]: trap_teeth - 264 [00:15:55]: waterplant_base - 206 [00:15:55]: waterplant - 206 [00:15:55]: rabbit - 191 [00:15:55]: rabbithole - 191 [00:15:55]: marsh_tree - 173 [00:15:55]: moon_tree - 164 [00:15:55]: fireflies - 160 [00:15:55]: wall_stone - 148 [00:15:55]: rock_ice - 140 [00:15:55]: rock_flintless - 134 [00:15:55]: wall_wood - 133 [00:15:55]: saltstack - 126 [00:15:55]: boat_plant - 126 [00:15:55]: marsh_bush - 125 [00:15:55]: rock1 - 125 ....
< >
Showing 1-3 of 3 comments
Hawaiian Hailama 22 Dec, 2020 @ 10:13pm 
I went through and deleted all `boat_world_collision_common` and `bridge_anchor` shut down and restarted. There are still just as many `boat_world_collision_common` so that number seems right. There are now only 127 `bridge_anchor` though and performance has improved.

I guess until this is fixed i'll just have admins go and purge `bridge_anchor` every so often.
Cuikui  [developer] 23 Dec, 2020 @ 11:35am 
Thank you very much for the detailed report, I just sent a patch for this problem to be solved. The problem will be solved the next time the server is restarted.

"boat_anchor" were supposed to disappear every time the server was stopped but it was not the case so their number increased with save/load. "boat_hull_collision_common" are used to mark the edge of the boat to fool the physics engine, several of them are needed for each boat so it is normal to have a large number of them.
Hawaiian Hailama 28 Dec, 2020 @ 4:50pm 
Great to hear, thanks!
< >
Showing 1-3 of 3 comments
Per page: 1530 50