Jump to content

Possible memory leak?

Closed 1.1.6

tenzu
tenzu

Posted

Hi.

I have noticed that this plugins consumes more and more memory after some time.
We have 5 or 6 event mods from you and use PveMode for half of them. So every hour it has something to do.
The consumed memory footprint starts with a few MB after server restart and after 8 hours it already needs more than 1 GB !
That's more memory than all other of our 42 plugins together.
Even TruePve (which has a lot more to do on our server) only needs 150 MB of memory.

So, there must be something wrong with this plugin because this amount of used memory is simply crazy. And since it adds up massively with every event run, I guess there is a memory leak somewhere in the code.

Steps to reproduce:

1. Fresh server
2. Install all of your Event plugins, configure them to use PveMode
3. Let all events start every 1-2 hours (random time)
4. Look after 8, 12 hours the used memory of PveMode plugin

KpucTaJl

Posted

Hi, please provide me with the test results (some graphs or what your words are based on), as well as the methods of testing implementation to make sure that you are conducting these tests correctly. Which events do you use, the PveMode parameters for these events. Make sure that the PveMode zone is destroyed after the event, and is also created without errors or NRE in the server console. That you use oxide or carbon. Server versions, oxide or carbon, plugin versions (make sure the plugin versions match the latest versions)

KpucTaJl

Posted

I have now launched my server, you said that you have 6 of my events, but I have launched all 10 of them that I use PveMode. As you indicated, I made them appear every 1-2 hours for each and indicated that they should use PveMode. My measurement results will be available in 8-12 hours. I hope that you will also have provided all the detailed information by then

KpucTaJl

Posted

and it would also be useful to know when it started for you?

tenzu

Posted

Hi KpucTaJl

Thanks for answering so fast. I appreciate it.

Answers:
- We use only oxide and all versions of oxide and all plugins are up-to-date.
- We use 4 events of you (gas station, junkyard, satellite dish, power plant) and 2 from Adem (Convoy, Armored Train). I was thinking that you work together because file and folder structure and readme is the same. I'm sorry for this mistake. Anyway, pve mode is in gas station, junkyard, armored train and convoy event.
- "Testing" or better noticing this issue was simply using "plugins" command in console and check the consumed memory from time to time. We also unloaded the pve mode and event plugins 2-3 times yesterday and could reproduce this behavior. And I'm not completely sure, because checking the memory footprint with plugins command only happened randomly over the day, but I think memory consumption for pve mode plugin grew most after the Armored train and Convoy events.
- There were no NRE or other error events except the few standard facepunch errors which happen from time to time and can be ignored. And the pve mode zones and events were destroyed successfully after the events ended.

However, it's weird (as often when it comes to plugin development of games :D). We had this problem yesterday all day long. Unloading pve mode and the other plugin events, restarted the server in the middle of the day and we could see this behavior the whole day. Now, after your questions, I checked again. The first time for today (because I'm working) and memory consumption is at 80MB and everything is fine.... There is a daily restart of the server, it happened 7 hours ago. But we restarted the server yesterday, too. And no one changed anything in between.

Right now, I have no idea why we had these problems yesterday... And tbh, we added pve mode plugin yesterday the first time. So there was no history we could rely on. And sure, it's not unusual that memory consumption grows over time for most software. But when it increases so much in a short time and don't stop increasing, then it is often an indicator for a possible memory leak.

But again, at least for now, I can no longer reproduce it and have no idea what was wrong yesterday...

(And yeah, I know that I sound like a beginner or someone who has no clue about software development and modded servers but, actually, that's not the case. lol )

So, I will keep an eye on it for the next days and if it happens again, I try to make more checks so that I can deliver more information to you. I'm sorry for the hassle.

Best
Tenzu

KpucTaJl

Posted

I have now checked my server and on my server it is now up to 425 MB. So I think I got the same thing as you. Therefore, I think that you are right and there really is a problem and I even have thoughts where it might be, I think that this problem could have appeared after the 1.1.2 update, which appeared on December 16. Therefore, I need about a day for tests to identify this and find the problem. Thanks for the feedback

KpucTaJl

Posted

I changed the code, started the server again with an updated version of PveMode. Last time the server was running for 6 hours and it was 425 MB. I left it on again for 6 hours and let's see the result

  • Like 1
tenzu

Posted

Thanks for the feedback.

But then this error or behavior isn't triggered all the time. Because today I didn't had this kind of problem. Makes it even harder to nail it down. If I can help you in any way, please let me know.

KpucTaJl

Posted

Hi, I have updated the plugin, but it is also necessary to update all plugins that use PveMode

  • Love 1
KpucTaJl

Posted

Changed Status from Pending to Closed

1.4m

Downloads

Total number of downloads.

6.9k

Customers

Total customers served.

102.1k

Files Sold

Total number of files sold.

2m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.