GarbageCollect takes very long, kicks players with packet flood

Hi,
we had to deactivate the friends plugin.
Everytime someone uses a /friends command, the server is lagging.
I tried "/friend list" and thats the outcome in the console:

(11:43:57) | Calling 'CommandFriend' on 'Friends v3.1.2' took 3483ms [GARBAGE COLLECT]

(11:44:04) | Calling 'CommandFriend' on 'Friends v3.1.2' took 3509ms [GARBAGE COLLECT]

(11:44:04) | Calling 'CommandFriend' on 'Friends v3.1.2' took average 3483ms [GARBAGE COLLECT]

(11:44:11) | Unloaded plugin Friends v3.1.2 by Wulf

hi,
we tried it again today to see if anything changed between wipes but we still have the exact same issue.
If player starts using the commands "/friend add" "/friend list" the server starts lagging and players get kicked.

(21:07:18) | Calling 'CommandFriend' on 'Friends v3.1.2' took 4113ms [GARBAGE COLLECT]
(21:07:25) | Calling 'OnColouredChat' on 'Friends v3.1.2' took average 4113ms
(21:07:47) | Calling 'CommandFriend' on 'Friends v3.1.2' took 3780ms
(21:07:47) | Calling 'CommandFriend' on 'Friends v3.1.2' took average 0ms
(21:07:47) | [Better Chat] [Global] [Discord] Toliman: (nicht steam freundesliste. die ingame über das plugin mit "/friend add name" und "/friend list"
(21:08:19) | Calling 'CommandFriend' on 'Friends v3.1.2' took 4377ms [GARBAGE COLLECT]
(21:08:19) | Calling 'CommandFriend' on 'Friends v3.1.2' took average 0ms [GARBAGE COLLECT]
(21:08:37) | Calling 'CommandFriend' on 'Friends v3.1.2' took 3899ms
(21:08:45) | Calling 'OnColouredChat' on 'Friends v3.1.2' took average 3899ms
(21:09:05) | Calling 'CommandFriend' on 'Friends v3.1.2' took 3848ms
(21:09:08) | Calling 'OnColouredChat' on 'Friends v3.1.2' took average 3848ms
(21:09:28) | Calling 'CommandFriend' on 'Friends v3.1.2' took 4445ms [GARBAGE COLLECT]
(21:09:28) | Calling 'CommandFriend' on 'Friends v3.1.2' took average 0ms [GARBAGE COLLECT]
(21:09:37) | Calling 'CommandFriend' on 'Friends v3.1.2' took 3940ms
(21:09:37) | Unloaded plugin Friends v3.1.2 by Wulf​

It's been 2 months, no response from plugin dev.

Your likely working with a severly old friend data file that has become quite large. The plugin isn't optimized at all, It needs rewritten, the way it handles player data. The only thing you can do is rewrite the plugin and delete the friends data file and start fresh. Or just keep deleting the friends data file each wipe to try and keep the file under control.

8SecSleeper

It's been 2 months, no response from plugin dev.

Your likely working with a severly old friend data file that has become quite large. The plugin isn't optimized at all, It needs rewritten, the way it handles player data. The only thing you can do is rewrite the plugin and delete the friends data file and start fresh. Or just keep deleting the friends data file each wipe to try and keep the file under control.

I will try that and hope players dont get upset to add all friends again :)
I hope the Clan system will make this plugin obsolete somehow

My plugin might do that if it ever gets approved.

It's an API for steam friends.

Allows you to make a simple hook for auth on things / blueprints / tpr requests and all the goodies.

With a simple call like...

IsSteamFriends(player1, player2)

I find most teammates and clan mates are steam friends and I made a plugin to take advantage of that fact.

That would be interesting. hope it works if players are invisible, or have privat profile

Toliman

That would be interesting. hope it works if players are invisible, or have privat profile


Invisible wouldn't matter, private profile does. However it checks both players profiles. So both need to be private to not work. Which isn't all that common.

To bump an old thread, apparently the person who fixed it on the server I play on said that it was due to the plugin saving every time a user friend added/removed someone, their fix was to change it to save whenever the server saved instead. This does cause some loss of friend data upon crashes, but likely will cause less issues due to the frequency of it being called.