I don’t actually have anything specific code wise to provide. As I’m already trying to narrow down thousands of lines of code, and different things.
My situation is that, the script activity hovers around 0%-0.5%, which is perfectly acceptable for this case. The issue however is the script rate climbs around 3000 every cycle of my game. Now any connections I make I disconnect, and I don’t reference or re-loop anything, and any loops I do use are conditioned to stop at the end of the game cycle. It climbs into the hundreds of thousands.
Game > loops through players > each player gets a unique loop, every 20th of a second it runs (wait(0.05)) so around 16 players in total. Now I have an idea around where this is caused, but my main question;
What types of things should I look out for that could cause memory leaks or never ending loops or connections, what types of things aren’t destroyed (like the player object, how it gets parented to nil instead of destroyed)
What is a good way to check absolutely everything as the possibility, as it really just seems to be random. Some servers have this issue while others don’t but nothing should cause this. (Can’t use the MicroProfiler since its server-sided)
So this is a bug and not my script? Because it’s been totally random and you have no idea what I’ve been going through trying to solve this.
I re-wrote like 500 lines of code, and I went through absolutely everything. As I stated it seems 100% random as some servers have it and others don’t, might as well mention it DOESN’T show in studio, at least not a since time I’ve checked it.
Alright, this may be service related or something. Testing it on a server with players, we managed to get the script performance to climb. There is 0 reason behind it as well, as we had the same exact server running and were shutting down to try and get the bug.
The amount it climbs and changes seems a bit dependent on all that is run, seems like it just doesn’t reset the count every second. As having servers with 500+ things going on per second and the rate and activity barely change, but on these random servers over a few hours it’s already at 100K+ on the rate but the activity never changes.
I don’t know what causes this and it seems a bit random, but it will climb endlessly. As stated, the amount it climbs truly seems determined by the actual activity of the script. I am trying to get a repro, but nothing seems to do it… but my current game/server has the current glitch.
I think the bug still exists. I have the most basic while loop (literally a while loop that waits 0.1 seconds per loop and runs like two lines of stupidly simple code) and it has the ever-increasing issue, but the activity stays about the same.