Players getting lagged
#1

Hello.

There seems to be an issue in my gamemode.
Sometimes a player is getting lagged so hard they have to relog, because otherwise objects stop streaming for them (I use streamer plugin) and they stop calling publics like OnPlayerTakeDamage and OnKeyStateChange or OnPlayerStateChange, only commands are working.
I have no idea what's causing it, is there any way I can find out?
Reply
#2

there may be a timer doing this error bro
Reply
#3

I checked every timer in the gamemode and they're all executed and killed properly.
Reply
#4

When did this begin happening? Any changes to your gamemode should be shared here so we can see.

Check your loops are not infinite, that can cause serious lag for players.

Especially check where you do /enter and /exit. I had the same issue when people were trying to enter businesses a long time ago and I managed to fix it, it was a lucky find.
Reply
#5

Bump

Sorry, I can't share my gamemode.
There are no infinite loops, I've checked all of them.

Perhaps there there exists a plugin or a fs that could help me find the issue?
Reply
#6

If you are sure that the lag is caused by your scripts, then you need to find a code that looks obvious to you. Anyway, I'd recommend you to benchmark your code; https://sampforum.blast.hk/showthread.php?tid=218491
Reply
#7

Run the profiler plugin and post the results here.

In my opinion, you have a memory leak (my guess from my experience + what you've told).

A memory leak is basically, creating something and forgetting to destroy it. You might have created 100000 objects accidentally.

1. Does the lag start immediately after the server starts?
2. Does it happen after few hours/minutes?
Reply
#8

I'm not 100% sure, but I think it happens after a few hours. Not all players are affected.
I'll run the plugin and make an edit.

// I've run it on an empty server: http://www33.zippyshare.com/v/bkOt5RMs/file.html
Reply
#9

bump
Reply
#10

Quote:
Originally Posted by Yashas
Посмотреть сообщение
Run the profiler plugin and post the results here.

In my opinion, you have a memory leak (my guess from my experience + what you've told).

A memory leak is basically, creating something and forgetting to destroy it. You might have created 100000 objects accidentally.

1. Does the lag start immediately after the server starts?
2. Does it happen after few hours/minutes?
Quote:
Originally Posted by Amads
Посмотреть сообщение
I'm not 100% sure, but I think it happens after a few hours. Not all players are affected.
I'll run the plugin and make an edit.

// I've run it on an empty server: http://www33.zippyshare.com/v/bkOt5RMs/file.html
I agree with Yashas, maybe you just have too much objects on map that causes serious lags to everyone.

I remember that happend to me too when I scripted zombie gamemode... one map had a lot of objects and it caused enormous lags to everyone so I had to redesign the map and removed over 40% of objects
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)