panel icon indicating copy to clipboard operation
panel copied to clipboard

Memory Leak caused by too many files/directory (Wings)

Open Loupric opened this issue 1 year ago • 3 comments

Current Behavior

Hello, I have a massive memory leak with Wings(latest version) when we have a server with a lot of files.

Expected Behavior

As soon as we have a server with a lot of files (minecraft with a dynmap for example), wings uses a lot of RAM (cache) without clearing it, restarting wings is of no use, as soon as it is turned back on, the memory fills up until it reaches saturation point. the machine.. (32G/32G of RAM)

Steps to Reproduce

  • Create a server with any egg (For this example I have take NodeJS and a code to create ~1m of files empty)
  • Create a lot of file (More file provoke more RAM used, to see this memory leak, pls create a minimum of 100k files.) In my case it's a dynmap map, Im uploading it in a .zip and giving you the link when it's uploaded
  • Just wait and observe memory used (cache) by wings (systemctl status wings)

Panel Version

1.11.5

Wings Version

1.11.11

Games and/or Eggs Affected

All of Eggs or Games, we just need to have a ton of files. (huge or small)

Is there an existing issue for this?

  • [X] I have searched the existing issues before opening this issue.
  • [X] I have provided all relevant details, including the specific game and Docker images I am using if this issue is related to running a server.
  • [x] I have checked in the Discord server and believe this is a bug with the software, and not a configuration issue with my specific system.

Loupric avatar Apr 07 '24 16:04 Loupric

  1. Can you post the output of free -h in here please, when having this high memory consumption? I want to make sure that we're having the same issue: https://github.com/pterodactyl/panel/issues/5115

Verox001 avatar Jun 04 '24 08:06 Verox001

  1. @Loupric Could you also provide if you're having a lot of SFTP login requests? Because the files shouldn't be an issue, since they're only loaded into memory, if the user tries to accesses them. Because large directories aren't displayed and therefore not loaded into memory anyway, the cause may be something else. I have the feeling that it has something to do with SFTP.

  2. Secondly, could you please tell if the memory leak is gone, after restarting the wings service?

Verox001 avatar Jun 04 '24 08:06 Verox001

Hi, the problem disappeared after completely reinstalling the machine, as I recall, restarting Wings caused the RAM usage to drop to 0. It was the cache that was used. If I remember the problem was caused by the wings permission check when starting the servers (can be deactivated in the wings config file). The cache fills up when starting a server with a lot of folders/files.

Loupric avatar Jun 16 '24 16:06 Loupric

Thanks for your report.

As the original poster is no longer having the issue, and I don't see anything to suggest it's distinct from #5115 I'm closing this issue as duplicate. If you run into it again and can demonstrate this is a distinct issue I'm happy to reopen.

danny6167 avatar Aug 07 '24 02:08 danny6167