Wulf please help me solve this riddle!
My server currently has 37 plugins.
150k entities on the map.
Memory leak (RustDedicated using 4.6gb of Ram)
Discussion in 'Rust Discussion' started by Ray Meres, May 5, 2015.
-
what makes you think it's a memory leak? does it get worse with time? do you have any errors in logs? does it depend on number of players in game?
do you have a test server you could try few things on? if yes:
copy your server profile on the test server
rename plugins directory to something temporary
note the memory usage
rename plugins directory back to "plugins"
note the memory usage
give it some time, at least one day/night in-game cycle
fly around the map, spawn a lot of bears and hunt them with c4, invite some friends over. try to run most of the commands you have in your plugins. keep an eye on the memory usage. if you see rapid increases note what you did just before them.
if the memory usage stays high but stable (or increases in reasonable speed), chances are it's not a leak and that is what heavily modded, heavily used rust server needs.
if the memory usage however keeps climbing even if you doesn't do anything, it might be a leak. somewhere objects are being created in memory and not disposed properly after we don't need them anymore. if that's the case:
in your console, use oxide.Unload on every single plugin. keep an eye on the memory usage while you do it. if you are lucky, the memory usage will stop raising when you unload one of them. this would probably be your culprit.
if you don't see anything obvious, restart your rust server and keep adding plugins one by one, every time playing on the map a little bit and playing with the plugin too if possible. keep an eye on that memory. hopefully you would find the trouble maker that way
this is a mundane thing to do but it might be necessary unfortunately. -
-
If you doesn't have a test server you would have to do it on your live one. Backup everything and close the server for 6 hours when it's least populated. -
-
not a public one, no, we are preparing one. whatever you are hinting at though, those are the correct steps to debug an issue like this -.-. but instead you choose to refuse to provide any extra info, you expect someone to solve/find you a "memory leak" on a server that has to stay live based on a screenshot from windows task manager. you need a master debugger and a remote psychic in one. "good luck with that, lol".
-
-
memory leak means that the program doesn't manage its memory correctly, as in forgets free up a memory regions it doesn't need anymore. that doesn't have to be a case here, maybe oxide and all the plugins would work perfectly normal when run separate. something in your setup may cause for example two plugins to call third plugins method too quickly one after another, and a logical switch somewhere gets flipped at the bad moment - and instead of two objects you get four. that doesn't really count as a memory leak since the software works as designed, you are just not executing it properlybugs like this would be very hard (if not impossible) to find by reading logs or source code files, even by very experienced programmers. you need a running server to run tests on, trust me, i'm trying to save you some wasted hours here. you can always try to get a free few days trial for a half-decent vps, or if you have to run RustDedicated.exe on your local machine.