SA-MP Forums Archive
SAMP calls a timer with 1s as interval many times a second (by many, I mean a lot) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: SAMP calls a timer with 1s as interval many times a second (by many, I mean a lot) (/showthread.php?tid=605094)



SAMP calls a timer with 1s as interval many times a second (by many, I mean a lot) - Yashas - 14.04.2016

For some mysterious reasons, the SAMP server starts calling a timer (with an interval of one second) many times per second after few days (less than 24 days) after a restart.

The server also stops accepting connections when this weird crap starts happening. The messages which are supposed to be sent every 5 minutes appear many times per second. The timer is being called at least 300 times to produce such an effect, but its even worse since many msgs which were supposed to be sent every 5 minutes appear in the same second.

So basically, the one second timer is being called WAY many times per second.

Any one has any clue why this happens?

This is not the first time this has happened. The only common thing between the two times when this happened was that "the server hadn't been restarted for many days" (less than 24 days).

http://imgur.com/ESoGktH <- you can see the messages which were supposed to be sent every few minutes being spammed.

I believe that the last restart was after 26th of March based on some evidence.


Re: SAMP calls a timer with 1s as interval many times a second (by many, I mean a lot) - Sithis - 14.04.2016

Perhaps calling a timer from within another timer?


Re: SAMP calls a timer with 1s as interval many times a second (by many, I mean a lot) - Yashas - 14.04.2016

Quote:
Originally Posted by Sithis
Посмотреть сообщение
Perhaps calling a timer from within another timer?
If this was the case, it would be a bug in the script which should have happened days ago, within few seconds or few minutes or hours after restart but this happens after many days 10+.

Moreover, calling a timer inside a timer is ridiculous.. I doubt no one would even think of that... if this was the case then the weird crap should've happened immediately after the restart but it doesn't.


Re: SAMP calls a timer with 1s as interval many times a second (by many, I mean a lot) - Yashas - 14.04.2016

No I took it myself. When players reported that the server's bot was spamming high ping kick messages... I went in-game to check it myself... I was shocked to see such a massive spam. In fact, I couldn't even try to gmx via RCON commands since the server wasn't responding.

It isn't the issue caused due to the AFK thing since if it was truly an AFK related pic then there would have been chat messages.

Its impossible to see such a silent server with 100+ players for 5 minutes

EDIT: Maybe 24 days did pass away since the last restart since some admin says the restart was nearly 3 weeks ago... :/

EDIT: I have some kind of evidence that shows that the restart was after 26th March which is 19 days ago.

EXTRA INFO: "was restarted 18 days ago"


Re: SAMP calls a timer with 1s as interval many times a second (by many, I mean a lot) - Yashas - 07.02.2017

Bumping as I've found what caused it.

Using KillTimer in a filterscript to kill a timer which was created in the gamemode (or another script?) causes the timer which was to be deleted to be executed continuously.


Re: SAMP calls a timer with 1s as interval many times a second (by many, I mean a lot) - kurta999 - 07.02.2017

Why you not try a timerfix plugin? Might it help. There is fixed version of fixes2 or another one made by Dan


Re: SAMP calls a timer with 1s as interval many times a second (by many, I mean a lot) - Shetch - 09.02.2017

This is caused by GetTickCount() overflow after 24 days. Check the Wiki about it and how to avoid such issues.