Exiled-Team / DiscordIntegration

GNU General Public License v3.0
13 stars 37 forks source link

[BUG] Discord Integration 6.0.3-1.4.2 nuking my server #124

Closed Oyplap closed 2 years ago

Oyplap commented 2 years ago

Describe the bug When the server is exceeding 11 players, the bot stops working (no logs and playercount is stuck) and uses a high amount of cpu and ram.

To Reproduce Steps to reproduce the behavior:

  1. Install Discord Integration 6.0.3-1.4.2
  2. Turn on servers an wait for players (Happens mostly when 11 players are online for some reason).
  3. See error

Expected behavior Bot should work and not crash.

Server logs https://pastebin.com/R1JUsXZR

EXILED Version ("latest" is not a version): 5.3.0-beta.4

Results of show plugins command in console:

[2022-08-12 00:43:28.643 +02:00] Total number of plugins: 19
                                 Enabled plugins: 19
                                 Disabled plugins: 0

                                 CedMod:
                                        - Author: ced777ric#8321
                                        - Version: 3.1.3
                                        - Required Exiled Version: 5.0.0
                                        - Prefix: cm
                                        - Priority: Highest
                                 Exiled.Events:
                                        - Author: Exiled Team
                                        - Version: 5.3.0.0
                                        - Required Exiled Version: 5.3.0.0
                                        - Prefix: exiled_events
                                        - Priority: Highest
                                 CiOnStart:
                                        - Author: Build
                                        - Version: 1.0.2
                                        - Required Exiled Version: 5.1.3
                                        - Prefix: ci_on_start
                                        - Priority: Higher
                                 Admin Tools:
                                        - Author: Originally by Galaxy119. Modifications by KoukoCocoa & Thomasjosif
                                        - Version: 5.1.0.0
                                        - Required Exiled Version: 5.1.0
                                        - Prefix: AT
                                        - Priority: Medium
                                 DiscordIntegration:
                                        - Author: DiscordIntegration
                                        - Version: 6.0.3.0
                                        - Required Exiled Version: 5.2.0
                                        - Prefix: discord_integration
                                        - Priority: Medium
                                 ShowZombieCount:
                                        - Author: Build
                                        - Version: 2.0.2
                                        - Required Exiled Version: 5.0.0
                                        - Prefix: show_zombie_count
                                        - Priority: Medium
                                 RemoteKeycard:
                                        - Author: Beryl (Maintained by Parkeymon)
                                        - Version: 3.1.3
                                        - Required Exiled Version: 5.2.0
                                        - Prefix: remotekeycard
                                        - Priority: Medium
                                 BetterSinkholes:
                                        - Author: Build
                                        - Version: 4.0.1
                                        - Required Exiled Version: 5.0.0
                                        - Prefix: better_sinkholes
                                        - Priority: Medium
                                 Exiled.Permissions:
                                        - Author: Exiled Team
                                        - Version: 5.3.0.0
                                        - Required Exiled Version: 5.3.0.0
                                        - Prefix: exiled_permissions
                                        - Priority: Medium
                                 Exiled.CustomItems:
                                        - Author: Exiled Team
                                        - Version: 5.3.0.0
                                        - Required Exiled Version: 5.3.0.0
                                        - Prefix: exiled_custom_items
                                        - Priority: Medium
                                 Ultimate-AFK:
                                        - Author: SrLicht
                                        - Version: 5.0.2
                                        - Required Exiled Version: 5.2.3
                                        - Prefix: Ultimate_Afk
                                        - Priority: Medium
                                 Exiled.CreditTags:
                                        - Author: Babyboucher20 & iRebbok & Exiled Team
                                        - Version: 5.3.0.0
                                        - Required Exiled Version: 5.3.0.0
                                        - Prefix: exiled_credits
                                        - Priority: Medium
                                 ScpSwap:
                                        - Author: Build
                                        - Version: 1.1.1
                                        - Required Exiled Version: 5.0.0
                                        - Prefix: ScpSwap
                                        - Priority: Medium
                                 RaimbowWaitingScreen:
                                        - Author: JesusQC
                                        - Version: 1.0.0.0
                                        - Required Exiled Version: 5.3.0.0
                                        - Prefix: RaimbowWaitingScreen
                                        - Priority: Medium
                                 CustomBadges:
                                        - Author: xRoier
                                        - Version: 1.0.0
                                        - Required Exiled Version: 2.3.3
                                        - Prefix: custombadges
                                        - Priority: Medium
                                 Scp008X:
                                        - Author: DGvagabond
                                        - Version: 3.1.2.0
                                        - Required Exiled Version: 5.2.1
                                        - Prefix: scp008_x
                                        - Priority: Medium
                                 Common Utilities:
                                        - Author: Joker119
                                        - Version: 6.2.0.0
                                        - Required Exiled Version: 5.2.1
                                        - Prefix: CommonUtilities
                                        - Priority: Medium
                                 Exiled.CustomRoles:
                                        - Author: Exiled Team
                                        - Version: 5.3.0.0
                                        - Required Exiled Version: 5.3.0.0
                                        - Prefix: exiled_custom_roles
                                        - Priority: Medium
                                 VcPatch:
                                        - Author: Cyanox & Mitzey
                                        - Version: 1.0.0.0
                                        - Required Exiled Version: 5.3.0.0
                                        - Prefix: vc_patch
                                        - Priority: Medium

Additional context I'm using pterodactyl panel and Parkey's egg: https://github.com/Parkeymon/EXILED-SCP-SL-egg/releases/tag/2.4.0

Oyplap commented 2 years ago

I have updated the pastebin because I forgot to paste the correct logs

joker-119 commented 2 years ago

Seems like nothing special happened on the server except a restart at the end of a round, which likely means the issue is related to the bot not discarding the tcp client from the server to wait for a new one properly. I'll take a look when I have time, for now it seems the easiest workaround would just not have the server auto-restart after x number of rounds, unless one of your plugins has a memory leak forcing you to do this, it should be fine.

Oyplap commented 2 years ago

Seems like nothing special happened on the server except a restart at the end of a round, which likely means the issue is related to the bot not discarding the tcp client from the server to wait for a new one properly. I'll take a look when I have time, for now it seems the easiest workaround would just not have the server auto-restart after x number of rounds, unless one of your plugins has a memory leak forcing you to do this, it should be fine.

This worked for some time, but its eating a lot of resources again: https://pastebin.com/TB1Pcgvc

joker-119 commented 2 years ago

The bot log would also be very helpful so I can see what it's doing, since it's the bot eating the resources.

When the resource eating happens, is it still posting stuff and responsive in discord now, or is it behaving like it did before where it just isn't connected to the SCP server anymore?

Oyplap commented 2 years ago

The bot log would also be very helpful so I can see what it's doing, since it's the bot eating the resources.

When the resource eating happens, is it still posting stuff and responsive in discord now, or is it behaving like it did before where it just isn't connected to the SCP server anymore?

When it happens, the bot stops sending logs and sorta "freezes". The plugin still works and tries to connect, but the bot does not respond anymore. It also does not update the bot status (playercount) anymore. This also happens everytime when you do "restartnextround" and / or "sr" (softrestart command).