My server crash with mysql -
aurimuxe7 - 11.12.2019
Hi, I don't even know where to start. Server crashes due to mysql troubles, but I don't even know how it crashes. I have optimized the code, everything looks fine, it should run without problems, but the server crashes. I turn on the server and it just crashes after about 2-3 hours. Sometimes it just breaks down as soon as you connect the server. As much as you watched the server logs, it crashes due to a mysql problem. I'll put logos here, please help, I need a lot of help.
An example:
[19:51:28] [TRANSPORTAS] Kraunamos zaidejo Bulca_Tacos masinos.
[19:51:29] [connection] incoming connection: 78.62.113.8:63470 id: 5
[19:51:29] [join] Cha_Cho has joined the server (5:78.62.113.
[19:51:29] [TRANSPORTAS] Kraunamos zaidejo Cha_Cho masinos.
[19:51:33] [connection] 83.189.196.79:55073 requests connection cookie.
[19:51:34] [connection] incoming connection: 83.189.196.79:55073 id: 6
[19:51:35] [join] Armoro_Penetracija has joined the server (6:83.189.196.79)
[19:51:35] [debug] Server crashed while executing sang.amx
[19:51:35] [debug] AMX backtrace:
[19:51:35] [debug] #0 native cache_get_field_content_int () from mysql_static.so
[19:51:35] [debug] #1 0024c740 in public OnLoadPlayerData (6) from sang.amx
The second example:
[20:10:56] [SANG.lt] Vartotojas Bron_Son panaudojo [ /sms sand tai kokià klaidà padariau? ] komanda
[20:10:56] [chat] [Abra_Cadabra]: scottai
[20:10:56] [chat] [Tremell_Santos]: xdd
[20:10:57] [chat] [Vilius_Gigantas]: Sveiki.
[20:10:58] [SANG.lt] Vartotojas James_Crazy panaudojo [ / jo ] komanda
[20:10:58] [chat] [Bulca_Tacos]: vielos
[20:10:58] [SANG.lt] Vartotojas Armoro_Penetracija panaudojo [ /r tau dar per anksti zinot apie mergos pataikymus ] komanda
[20:10:58] [chat] [Michael_Scott]: nu
[20:10:59] [debug] Server crashed while executing sang.amx
[20:10:59] [debug] AMX backtrace:
[20:10:59] [debug] #0 native mysql_format () from mysql_static.so
[20:10:59] [debug] #1 003a9048 in ?? (1) from sang.amx
[20:10:59] [debug] #2 003a8758 in public cmd_direktoriai (20, 25252416) from sang.amx
[20:10:59] [debug] #3 native CallLocalFunction () from samp03svr
[20:10:59] [debug] #4 000026fc in public OnPlayerCommandText (20, 25252364) from sang.amx
Re: My server crash with mysql -
JasonRiggs - 11.12.2019
Use debug level 3 to know which line exactly causes the crash, create a file called pawn.cfg and write inside it
and put it inside the pawno folder in your gamemode directory, then recompile and run the server again, the crash log will show you the error line.
Re: My server crash with mysql -
MichaelScott - 11.12.2019
Hey, I'm the scripter from this server and the Pawn.cfg with -d3 was already added. Sometimes it doesn't show the line, but when it does, it almost always is cache_get_field_content_int. The thing is, the server almost every time crashes from mysql and it happens randomly without a specific place that crashes the server, just randomly. It is very odd and we can't figure out what is happening for a few days already. The mysql version is R39.
Re: My server crash with mysql -
Joe Staff - 11.12.2019
Do you know which table/row that it's reading from during the crash? It might be receiving a bill when it's expecting an integer, or something like that.
Re: My server crash with mysql -
MichaelScott - 11.12.2019
I don't think that it is the case, because for example few minutes ago it crashed from this:
HTML Code:
PlayerStats[playerid][GasCargoAll] = cache_get_field_content_int(0, "GasCargoAll");
It definitely is int in the database.
Re: My server crash with mysql -
MichaelScott - 11.12.2019
If it helps, now it crashed from:
HTML Code:
[19:25:54] [debug] Server crashed while executing sang.amx
[19:25:54] [debug] AMX backtrace:
[19:25:54] [debug] #0 native mysql_format () in mysql_static.so
[19:25:54] [debug] #1 00254f34 in SaveVarzybos (playerid=0, 0, 0, 1143324020, 567, 289, 0, 0, 4, 6, ... <6317172 more arguments>) at lib/stocks.pwn:657
[19:25:54] [debug] #2 002f4ab4 in public PlayedMinute () at C:\Users\Aurimas\Desktop\SANG\gamemodes\sang.pwn:2391
The lines :
HTML Code:
657 : mysql_format(connectionHandle, SQLString, sizeof SQLString, "UPDATE `fishing_data` SET `fishesMoneyToday` = '%i' WHERE `belongs_to` = '%e'", PlayerDB[playerid][fishesMoneyToday], Vardas(playerid));
2391: if(PlayerDB[playerid][CantPlayBecouseOfBan] == true)
Re: My server crash with mysql -
Calisthenics - 11.12.2019
R39 was released in 2014 and similar crash was reported here:
https://forum.sa-mp.com/showpost.php...postcount=5283
Update to R39-6 and see the results.
Re: My server crash with mysql -
UnknownGamer - 11.12.2019
Quote:
Originally Posted by MichaelScott
If it helps, now it crashed from:
HTML Code:
[19:25:54] [debug] Server crashed while executing sang.amx
[19:25:54] [debug] AMX backtrace:
[19:25:54] [debug] #0 native mysql_format () in mysql_static.so
[19:25:54] [debug] #1 00254f34 in SaveVarzybos (playerid=0, 0, 0, 1143324020, 567, 289, 0, 0, 4, 6, ... <6317172 more arguments>) at lib/stocks.pwn:657
[19:25:54] [debug] #2 002f4ab4 in public PlayedMinute () at C:\Users\Aurimas\Desktop\SANG\gamemodes\sang.pwn:2391
The lines :
HTML Code:
657 : mysql_format(connectionHandle, SQLString, sizeof SQLString, "UPDATE `fishing_data` SET `fishesMoneyToday` = '%i' WHERE `belongs_to` = '%e'", PlayerDB[playerid][fishesMoneyToday], Vardas(playerid));
2391: if(PlayerDB[playerid][CantPlayBecouseOfBan] == true)
|
That version is way out-dated. Prefer, if possible, re-write to R41-4. We had this crash issue a lot with R39.
Re: My server crash with mysql -
Joe Staff - 12.12.2019
I remember some time ago having issues with connections sticking. I had to have a timer run every minute or so to run some arbitrary query to keep the connection going