Server half crashes when incoming connection (randomly)
#1

So, in my situation a half-crash would be when the server appears to be offline in the sa-mp client, but the IRC plugin and the commands still work. All players will loose connection and won't be able to reconnect.

I've had random half crashes the past year(s). Now lately the frequency has been higher, and it has eventually become a problem. I have crashdetect installed, also Zeex proflier plugin, but under a half crash, i get no entries in my logs except for:



and this is not much of a clue.

I tried debugging the entire OnPlayerConnect - but nothing in it are printed to the log, meaning it never reaches it before the half-crash occur.

Can anyone in here come with some good ideas how this could be solved? And eventually what it could be caused by?

Thanks
Reply
#2

I've experienced this before when performing lengthy calculations using large numbers (someones money) and during the calculation the variable exceeds variable restraints and rolls over into a negative value before the full calculation is complete.

After that all my commands returned "Server: Unknown Command" and my filesystem "Y_ini" either swiped (cleared) accounts used thereafter or didn't work at all.

Maybe your issue is like mine, in which case you're looking for an account that has a value that loads from file which exceeds variable restraints.

Possibly money.
Reply
#3

Quote:
Originally Posted by Killa[DGZ]
Посмотреть сообщение
I've experienced this before when performing lengthy calculations using large numbers (someones money) and during the calculation the variable exceeds variable restraints and rolls over into a negative value before the full calculation is complete.

After that all my commands returned "Server: Unknown Command" and my filesystem "Y_ini" either swiped (cleared) accounts used thereafter or didn't work at all.

Maybe your issue is like mine, in which case you're looking for an account that has a value that loads from file which exceeds variable restraints.

Possibly money.
This sounds like something it could be, but my server stops upon handling the connection of the player. It seems from the debugging i added, that it never reaches OnPlayerConnect.

Thanks for the reply anyway
Reply
#4

It's so hard to tell if it stops on the handling of a new connection from another player or from the last person that connected and possibly loaded erroneous values into memory.

Just try checking the values within accounts of those online and logged in or last logged in at the time this occurs, you may find your answers there.
Reply
#5

Quote:
Originally Posted by Killa[DGZ]
Посмотреть сообщение
It's so hard to tell if it stops on the handling of a new connection from another player or from the last person that connected and possibly loaded erroneous values into memory.

Just try checking the values within accounts of those online and logged in or last logged in at the time this occurs, you may find your answers there.
I wouldn't have gone this way and post here when the same thing happens every time.

Incoming connection and it freezes.
This happened 99/100 times
Reply
#6

The server keeps on freezing on incoming connections.

Does anyone have a clue? I've been trying everything in my knowledge to find out this, which is why im trying here on the forums now to see if anyone knows.
Reply
#7

Quote:
Originally Posted by denNorske
Посмотреть сообщение
I wouldn't have gone this way and post here when the same thing happens every time.

Incoming connection and it freezes.
This happened 99/100 times
I'm just saying that there is a possibility the issue is created from the last player who left (I've seen this before) which is causing the server to hang when the next person joins and maybe consumes the same ID where the problem began, maybe something hasn't finished executing?, infinite loop?

I see in the screenshot there.. that someone left the server about 20 seconds before this happened an they were on ID:3, then someone new joined and I guess would've consumed ID:3. So my best advice to you is to go through your OnPlayerDisconnect and check that and the functions that are called from there for problems.

What OS does your server use?, Does the server ever fully crash?, if so whats the exception address?, do players get hourglass icons when this occurs?

Remember your server is single threaded so it can only process 1 thing at any 1 time, if it's already processing something.. other things called to be processed will enter a queue and have to wait until it's completed.. so if for some reason that 1 thing doesn't complete then nothing else can and the queue gets bigger until it's overwhelmed and server hangs (this is my understanding of it, someone correct me if I'm wrong).
Reply
#8

You should check if CPU usage for that core spikes to 100%. If that happens it's probably an infinite loop of some sort. Note that the SA-MP server is single threaded so if you have a quadcore it will show up as 25% for the package.
Reply
#9

Quote:
Originally Posted by Vince
Посмотреть сообщение
You should check if CPU usage for that core spikes to 100%. If that happens it's probably an infinite loop of some sort. Note that the SA-MP server is single threaded so if you have a quadcore it will show up as 25% for the package.
You were right.

During a half crash, the connections to all players are lost. The server either stops calling OnPlayerUpdate or so, but the server still functions from IRC, however it's not accessible.


With an update frequency of 1 second, the peaks would be at 99% every 3 second, continuously. _/\_____/\_____/\____/\______/\______

something like that.

Thanks for informing me. But how can this cause the server to drop all the connections? is it ending up too far behind the "real clock" that it's not keeping up with it's tasks?
Reply
#10

this same situation i faced in my server.
i had a loop. so if it is true it is executed well and good but if it is false my server clock freezes and also even server freezes and i fixed it by making the loop to get to only true values..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)