(Crash) connexion lost without reason ?
#1

Good morning,

I have a problem with my server, sometines every players (and bots) are disconnect without reasons in logs. The server don't really crash because vehicles are still in the same place when I reconnect. BUT bots do not reconnect automaticatly.

It's like a little disconnection(1 second) and all players have this :



I have NOTHING in logs so this is why I hope you have an idea...



I use :
- debian 9 - 64 bits
- MySQL
- SA:MP 0.3.8 RC4-1
- mSelection edit for 0.3.8
- Incognito streamer (last version)
- Crash detect

To be honestly, I think this is not due to 0.3.8 version.. Hope you can help me.

Thanks for all
Reply
#2

Show when you start your vehicle ("dйmarrage autorisй" literally mean "allowed starting". I guess he's talking about vehicle)
Reply
#3

Hi, thanks for the answer but this problem is here even when there is no players connected, so... impossible
Reply
#4

Quote:
Originally Posted by Raiden57
Посмотреть сообщение
Hi, thanks for the answer but this problem is here even when there is no players connected, so... impossible
Well, the problem come from a regular iteration. Have you "10sec" timers or something like that?
Reply
#5

Yes a lot but, this is not a "network" problem ?

I have run a test server (whitout players) and he have crash (I know that because I have see the bots disconnected)

Can this problem come from timers ?



What I don't understand is that the logs do not find anything. Yet I have crashdetect..
Reply
#6

Quote:
Originally Posted by Raiden57
Посмотреть сообщение
Yes a lot but, this is not a "network" problem ?

I have run a test server (whitout players) and he have crash (I know that because I have see the bots disconnected)

Can this problem come from timers ?



What I don't understand is that the logs do not find anything. Yet I have crashdetect..
Is your server restarting?
Can you post your general timers there?
Reply
#7

Not really a restart, just kicking all players (and bots). But vehicles stay at the same position (so not a "real" restart)

Код:
public timerGeneral()
{
	time2sec++;
	time5sec++;
	time60sec++;

	if(time60sec==60)
	{
	    time5min++;
		time30min++;
		time60min++;
	}

	if(time60sec%60 == 0) // 1 min gйnйral (reset des variables de comptage)
	{
	    Medics = 0;
		taxi_nbrTaximen = 0;
	 	Pizza = 0;
	  	Mechanics = 0;
	  	Truckers = 0;
	  	cop_nbrCops = 0;
	  	if(pizza_currentMission != 0) pizza_mission();
	}

	// Timers appliquйs aux joueurs
	foreach(new i : Player)
	{
		if(!IsPlayerConnected(i) || !gPlayerLogged[i])
			{continue;}

  		timer1sec(i);
		if(time2sec%2 == 0)  	{timer2sec(i);}
		if(time5sec%5 == 0)  	{timer5sec(i);}
		if(time60sec%60 == 0)	{timer1min(i);}
		if(time5min%6 == 0)		{timer5min(i);}
		if(time30min%31 == 0)	{timer30min(i);}
		if(time60min%61 == 0)	{timer60min(i);}
	}

	if(time2sec >= 2)
	{
	    time2sec = 0;
	}
	if(time5sec >= 5)
	{
		check_reloadSQL();
		time5sec = 0;
	}
	if(time60sec >= 60)
	{
    	new hour, minute, second;
		gettime(hour, minute, second);

		if(minute == 0)
		{
		    new players_count = 0;
			foreach(new i : Player)
			{
				if(IsPlayerConnected(i) && gPlayerLogged[i]!=0)
				{
					if(isafk[i] != 1)
						{PayDay(i); mission_random(i);}
					players_count++;
				}
			}

            new query1[MAX_STRING], query2[MAX_STRING], query3[MAX_STRING];
			format(query1, sizeof(query1), "UPDATE srp_players_vip SET Expiration = (Expiration-1) WHERE Expiration > 0"); // Dйcrйmentation des packs VIP
			format(query2, sizeof(query2), "UPDATE srp_log_tempbans SET remaintime = (remaintime-1) WHERE remaintime > 0"); // Dйcrйmentation des bans temporaires
			format(query3, sizeof(query3), "INSERT INTO srp_server_stats VALUES('', %d, NOW())", players_count); // Sauvegarde du nombre de connectйs

			mysql_query(dbc, query1, false);
			mysql_query(dbc, query2, false);
			mysql_query(dbc, query3, false);

			IncCadavreTimes(); // On incrйmente les temps (heures) des cadavres
		}

		if(hour == 20 && minute == 0)
			{loterie_tirage();}

		if(hour%2 == 1 && minute == 0)
		{
		    new string[MAX_STRING_MSG];
		    format(string, sizeof(string), "Los Santos Lottery: le jackpot est de %d$! Tickets en vente en bureau de tabac. Tirage tous les jours а 20h.", loterie_jackpot);
			SendClientMessageToAll(COLOR_BIZ, string);
		}

		drop_checkDestroy();
		time60sec = 0;
	}
	if(time5min >= 6)
	{
    	gym_init(false);
		cop_unauthoriseswat();
		house_decrementCleanTime();
	  	time5min = 1;
	}
	if(time30min >= 31)
	{
		time30min = 1;
	}
	if(time60min >= 60)
	{
		SetTimer("rp_decCount24h",15000,false);
		SetTimer("biz_decrementLoc",30000,false);
		SetTimer("house_tcambriolee",60000,false);
		if(braquage_remainTime>0)
			{braquage_decrementTime();}
		Payday_Maj();
		ChangeHour();
		meteo_change();
		time60min = 1;
  	}
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)