SA-MP Forums Archive
Players getting lagged - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Players getting lagged (/showthread.php?tid=603964)



Players getting lagged - Amads - 29.03.2016

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?


Re: Players getting lagged - sheNdjze - 29.03.2016

there may be a timer doing this error bro


Re: Players getting lagged - Amads - 29.03.2016

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


Re: Players getting lagged - Dokins - 30.03.2016

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.


Re: Players getting lagged - Amads - 21.06.2016

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?


Re: Players getting lagged - Sjn - 21.06.2016

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


Re: Players getting lagged - Yashas - 21.06.2016

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?


Re: Players getting lagged - Amads - 22.06.2016

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


Re: Players getting lagged - Amads - 24.06.2016

bump


Re: Players getting lagged - TomRedlake - 24.06.2016

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