Server stucking...
#1

Hi, I want to ask, why my server is always geting stuck? Servers shows players online, but no one can join it, in log it starts print "Incoming connection...".
Reply
#2

Did you contact your host on this? Perhaps it might be a issue on their end?
Reply
#3

Quote:
Originally Posted by ColorHost-Kevin
Посмотреть сообщение
Did you contact your host on this? Perhaps it might be a issue on their end?
I have VPS server and the problem ocours only from saturday. So I dobt that is VPS problems.

P.S. in linux command "top -c" samp server proces shows 100+% cpu.
Reply
#4

You have to contact your VPS Host, it may be CBU is full just upgrade it!
_________________
Hosted Tab Game-MP for 10 Euro / per month
Hosted Tab + Server host 50 slots + Control Panel for 15 Euro

Skype: MahdiAsali
Reply
#5

Quote:
Originally Posted by MahdiGames
Посмотреть сообщение
You have to contact your VPS Host, it may be CBU is full just upgrade it!
_________________
Hosted Tab Game-MP for 10 Euro / per month
Hosted Tab + Server host 50 slots + Control Panel for 15 Euro

Skype: MahdiAsali
But if it stucks random, it still can be CBU problem?
Reply
#6

An infinite loop is notorious for blocking server execution and causing 100% CPU usage. Either that, or you're still being attacked by the tool that this patch has solved.
Reply
#7

Or You can Optimize your server scripts to use less CPU.
Reply
#8

Quote:
Originally Posted by Mr.Faqahat
Посмотреть сообщение
Or You can Optimize your server scripts to use less CPU.
Thats not an optimization fault...

I'll try to search infinitive loop, so much work ;/
Reply
#9

I had (and i actually still have) this issue, but as Vince said, it's mostly due to an infinite loop.

Also; try to debug and you'll find where it causes the "server freeze"

Quote:
Originally Posted by Dr.Einstein
Посмотреть сообщение
Sorry for bumping this topic, but this is important.

I had this problem with my server and I fixed it.
As Mellnik said, it is a timer in the game-mode itself and not on any filter-scripts. We all know that this problem is caused by a while loop. So, I did some tests, if the infinite loop is in a filter-script, the r-con commands do work and players are able to join. On the other hand, if that infinite loop is in the game-mode itself, then the sever will seem OK, but it is actually frozen and no one can join, hence Kicking IP *.*.*.*:**** because they didn't log on to the game..

The way I came around it is by checking all my while loops. Now, I didn't know which one of them actually caused the problem so I added a sentinel for each 'while' loop that I found, so if a loop counter is passed that, a message would show on the logs telling me that the this loop is broken.

Example:

Код:
new counter=0, i;
while(i == 1)//we know that this is an infinite loop because we do not change the value of 'i'
{
     // our normal code in here and at the end we increment the counter and check to see if we have a problem...
     if(++counter >= 5000)//now, you can change the sentinel value to whatever fits the use of your loop
     {
             printf("Infinite loop has been stopped. Loop at function: 'function name'"); // we place the function name so we can pinpoint the problem and do something about the loop.
             break; //we break the loop.
     }
}
Reply
#10

Quote:
Originally Posted by deividass
Посмотреть сообщение
Thats not an optimization fault...

I'll try to search infinitive loop, so much work ;/
Maybe, but last i time i had this problem, i found that my script and especially server saving system and all that was using too much cpu sometimes so. i had to optimize it and it worked for you it might be anyother reason.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)