Help [Lag Server]
#1

Hello

i have Problem , when server , is save Houses ,Biz ,cars...[PS :i see it in Server Log] , is lag all players , i see all players is AFK , lag , and after 4 5 minutes is back normal no lag
[i use GM LSL-RP]
Log Server
Код:
[13:07:40] [chat] [Jeunesse_Adil]: take a car
[13:07:41] [chat] [Jeunesse_Adil]: :p
[13:08:15] Saving IRC channels
[13:08:16] IRC channels saved.
[13:09:41] Incoming connection: 5.0.45.1:52559
[13:10:00] Saving trunk info
[13:10:11] Kicking 5.0.45.1 because they didn't logon to the game.
[13:10:37] Trunk info saved
[13:10:47] [MYSQL]: Saving bans to MYSQL (to kenitra_kenitra).
[13:10:47] Incoming connection: 5.0.45.1:52560
[13:10:48] [MYSQL]: Bans saved to MYSQL (to kenitra_kenitra).
[13:10:48] [MYSQL]: Saving MYSQL data to kenitra_kenitra.
[13:10:48] [MYSQL]: Saving houses to MYSQL (in kenitra_kenitra).
[13:10:59] [MYSQL]: Houses have been saved to kenitra_kenitra.
[13:10:59] [MYSQL]: Saving businesses to MYSQL (in kenitra_kenitra).
[13:11:00] [MYSQL]: Businesses saved to MYSQL (in kenitra_kenitra).
[13:11:00] [MYSQL]: Saving SBusinesses to MYSQL (in kenitra_kenitra).
[13:11:00] [MYSQL]: SBusinesses saved to MYSQL (in kenitra_kenitra).
[13:11:00] [MYSQL]: Saving furn to MYSQL (in kenitra_kenitra).
[13:11:18] Kicking 5.0.45.1 because they didn't logon to the game.
[13:11:37] [MYSQL]: Furn saved to MYSQL (in kenitra_kenitra).
[13:11:37] Saving dropped items to mysql...
[13:11:45] Dropped items saved to mysql.
[13:11:46] [part] Artem_Hiber has left the server (1:1)
[13:11:47] [part] Donny_Hayes has left the server (0:1)
[13:11:47] [part] Jared_Henderikson has left the server (2:1)
[13:11:48] [part] Alber_Delgardo has left the server (0:3)
[13:11:48] [part] Sniper_Rexio has left the server (0:4)
[13:11:49] Invalid client connecting from 5.0.45.1
Reply
#2

Bump
Reply
#3

whats the return in "onplayerupdate"?
if 0 it lags and change it to 1
Reply
#4

Where do you hosted your server?
Reply
#5

Quote:
Originally Posted by Rockyyy
Посмотреть сообщение
whats the return in "onplayerupdate"?
if 0 it lags and change it to 1
Thank For answer!

Not Work , and again.
Reply
#6

Quote:
Originally Posted by SPA
Посмотреть сообщение
Where do you hosted your server?
ru-hoster.com
Reply
#7

the timer's ?
Reply
#8

Код:
[13:10:00] Saving trunk info
[13:10:11] Kicking 5.0.45.1 because they didn't logon to the game.
[13:10:37] Trunk info saved
That is a 37 second gap. I hope you're using threaded queries?
Reply
#9

https://sampforum.blast.hk/showthread.php?tid=55261

Read this.
Reply
#10

Quote:
Originally Posted by Vince
Посмотреть сообщение
Код:
[13:10:00] Saving trunk info
[13:10:11] Kicking 5.0.45.1 because they didn't logon to the game.
[13:10:37] Trunk info saved
That is a 37 second gap. I hope you're using threaded queries?
, in Trunk Info Saved Code :
pawn Код:
}
    printf("Trunk info saved");
}

forward LoadTrunk();
public LoadTrunk()
{
    new arrCoords[13][15];
    new row[256];
    new string[128];
    new idx;
    printf("Loading trunk info");
    while (idx < sizeof(CarInfo))
    {
        format(string, sizeof(string), "SELECT * FROM `trunk` WHERE `ID`=%d", idx);
        mysql_query_ex(string);
        mysql_store_result();
        if(mysql_num_rows() > 0)
        {
            mysql_fetch_row(row);
            split(row, arrCoords, '|');
            mysql_free_result();
            vehTrunk[idx][1] = strval(arrCoords[1]);
            vehTrunkAmmo[idx][1] = strval(arrCoords[2]);
            vehTrunk[idx][2] = strval(arrCoords[3]);
            vehTrunkAmmo[idx][2] = strval(arrCoords[4]);
            vehTrunk[idx][3] = strval(arrCoords[5]);
            vehTrunkAmmo[idx][3] = strval(arrCoords[6]);
            vehTrunk[idx][4] = strval(arrCoords[7]);
            vehTrunkAmmo[idx][4] = strval(arrCoords[8]);
            vehTrunkCounter[idx] = strval(arrCoords[9]);
            vehTrunkArmour[idx] = floatstr(arrCoords[10]);
            vehTrunkMisc[idx][0] = strval(arrCoords[11]);
            vehTrunkMisc[idx][1] = strval(arrCoords[12]);
        }
        mysql_free_result();
        idx++;
    }
    printf("Trunk info loaded.");
    return 1;
}
Saving Trunk Info :
pawn Код:
forward SaveTrunk();
public SaveTrunk()
{
    new idx;
    idx = 0;
    new coordsstring[512];
    printf("Saving trunk info");
    while (idx < sizeof(CarInfo))
    {
        format(coordsstring, sizeof(coordsstring), "UPDATE `trunk` SET `VehTrunk1`=%d,`VehTrunkAmmo1`=%d,`VehTrunk2`=%d,`VehTrunkAmmo2`=%d,`VehTrunk3`=%d,`VehTrunkAmmo3`=%d,`VehTrunk4`=%d,`VehTrunkAmmo4`=%d,`vehTrunkCounter`=%d,`vehTrunkArmour`=%f,`vehTrunkMisc1`=%d,`vehTrunkMisc2`=%d WHERE ID=%d",
        vehTrunk[idx][1],
        vehTrunkAmmo[idx][1],
        vehTrunk[idx][2],
        vehTrunkAmmo[idx][2],
        vehTrunk[idx][3],
        vehTrunkAmmo[idx][3],
        vehTrunk[idx][4],
        vehTrunkAmmo[idx][4],
        vehTrunkCounter[idx],
        vehTrunkArmour[idx],
        vehTrunkMisc[idx][0],
        vehTrunkMisc[idx][1],
        idx);
        mysql_query_ex(coordsstring);
        /*format(coordsstring, sizeof(coordsstring), "INSERT INTO `Trunk` (`VehTrunk1`,`VehTrunkAmmo1`,`VehTrunk2`,`VehTrunkAmmo2`,`VehTrunk3`,`VehTrunkAmmo3`,`VehTrunk4`,`VehTrunkAmmo4`,`vehTrunkCounter`,`vehTrunkArmour`,`vehTrunkMisc1`,`vehTrunkMisc2`) VALUES (%d,%d,%d,%d,%d,%d,%d,%d,%d,%f,%d,%d)",
        vehTrunk[idx][1],
        vehTrunkAmmo[idx][1],
        vehTrunk[idx][2],
        vehTrunkAmmo[idx][2],
        vehTrunk[idx][3],
        vehTrunkAmmo[idx][3],
        vehTrunk[idx][4],
        vehTrunkAmmo[idx][4],
        vehTrunkCounter[idx],
        vehTrunkArmour[idx],
        vehTrunkMisc[idx][0],
        vehTrunkMisc[idx][1]);
        mysql_query_ex(coordsstring);*/

        idx++;
    }
    printf("Trunk info saved");
}

forward LoadTrunk();
public LoadTrunk()
{
    new arrCoords[13][15];
    new row[256];
    new string[128];
    new idx;
    printf("Loading trunk info");
    while (idx < sizeof(CarInfo))
    {
        format(string, sizeof(string), "SELECT * FROM `trunk` WHERE `ID`=%d", idx);
        mysql_query_ex(string);
        mysql_store_result();
        if(mysql_num_rows() > 0)
        {
            mysql_fetch_row(row);
            split(row, arrCoords, '|');
            mysql_free_result();
            vehTrunk[idx][1] = strval(arrCoords[1]);
            vehTrunkAmmo[idx][1] = strval(arrCoords[2]);
            vehTrunk[idx][2] = strval(arrCoords[3]);
            vehTrunkAmmo[idx][2] = strval(arrCoords[4]);
            vehTrunk[idx][3] = strval(arrCoords[5]);
            vehTrunkAmmo[idx][3] = strval(arrCoords[6]);
            vehTrunk[idx][4] = strval(arrCoords[7]);
            vehTrunkAmmo[idx][4] = strval(arrCoords[8]);
            vehTrunkCounter[idx] = strval(arrCoords[9]);
            vehTrunkArmour[idx] = floatstr(arrCoords[10]);
            vehTrunkMisc[idx][0] = strval(arrCoords[11]);
            vehTrunkMisc[idx][1] = strval(arrCoords[12]);
        }
        mysql_free_result();
        idx++;
    }
    printf("Trunk info loaded.");
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)