SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 14/02/2014, 03:34 PM   #1
Gecko75
Big Clucker
 
Join Date: Jan 2013
Location: murica
Posts: 68
Reputation: 0
Default MySQL database crashes my server

I've tried a few things so far.

Each time I start my server (The host's start button) the server runs for a few seconds, then immediately stops when MySQL begins loading everything. I checked the logs, and it stops at Loading something half-way.

All the loading stocks come in order under OnGameModeInit, but I'd assume it's from there, because it stops about mid-way through calling OnGameModeInit.

I'd imagine it's something with MySQL, but I've never encountered this issue with my script ever. I'm not sure about what to do.
Gecko75 is offline   Reply With Quote
Old 14/02/2014, 03:38 PM   #2
CuervO
High-roller
 
CuervO's Avatar
 
Join Date: Oct 2008
Posts: 1,164
Reputation: 200
Default Re: MySQL database crashes my server

Show the mysql_log, enable the debug all mode.

Which version of the SQL Plugin are you using?
__________________
[IMG]http://************/pdpu4qe[/IMG]    - Team Fortress 2 [Gamemode] [SQL] [Whirlpool] [Streamer] [Sscanf] [ZCMD]
[IMG]http://************/pdpu4qe[/IMG] - Live map object editor [Filterscript] [DINI] [Streamer] [Sscanf] [ZCMD]
[img]http://************/pdpu4qe[/img] [img]http://************/nfxrrrz[/img] - Inventory & Object System [Filterscript] [SQL] [Streamer] [Sscanf] [ZCMD]

- RenderMessage(toAll) [Snippet]
CuervO is offline   Reply With Quote
Old 14/02/2014, 03:40 PM   #3
Konstantinos
Spam Machine
 
Konstantinos's Avatar
 
Join Date: Dec 2011
Posts: 11,827
Reputation: 1401
Default Re: MySQL database crashes my server

Load crashdetect plugin and compile with debug info. Re-compile your scripts and start the server again. Post the server log.
__________________
Life is like riding a bicycle. To keep your balance, you must keep moving.

[Tutorial] How to use SQLite
[FilterScript] Tune System
Konstantinos is offline   Reply With Quote
Old 14/02/2014, 04:55 PM   #4
Gecko75
Big Clucker
 
Join Date: Jan 2013
Location: murica
Posts: 68
Reputation: 0
Default Re: MySQL database crashes my server

Here's the server log itself, with crashdetect.
Code:
[10:49:59] ========================================== 
[10:49:59] 
[10:49:59] Loaded 16 labels from MySQL.
[10:49:59] Loaded 5 dynamic gates from MySQL.
[10:49:59] Loaded 20 ATM's from MySQL.
[10:49:59] Loaded 41 admin teleports from MySQL.
[10:50:00] Loaded 315 dynamic objects from MySQL.
[10:50:00] Loaded 3 dynamic infos from MySQL.
[10:50:00] Loaded 16 dynamic gas stations from MySQL.
[10:50:00] Loaded 1 dynamic banks from MySQL.
[10:50:00] Loaded 70 dynamic vehicles from MySQL.
[10:50:01] Loaded 219 dynamic houses from MySQL.
[10:50:01] Loaded 26 dynamic businesses from MySQL.
[10:50:01] Loaded 6 dynamic food stands from MySQL.
[10:50:01] Loaded 6 dynamic park meters from MySQL.
[10:50:02] Loaded 6 APB's from MySQL.
[10:50:02] [debug] Server crashed while executing a-rp.amx
[10:50:02] [debug] AMX backtrace:
[10:50:02] [debug] #0 native cache_get_row_int () [70453cb0] from mysql.DLL
[10:50:02] [debug] #1 00103668 in public LoadDynamicFactions () at C:\Users\theo\Desktop\1.16.2014\True Life RP\gamemodes\A-RP (Non-UCP)\a-rp.pwn:12846
[10:50:02] [debug] Native backtrace:
[10:50:02] [debug] #0 66189055 in ?? () from C:\Windows\SYSTEM32\MSVCR110.dll
[10:50:02] [debug] #1 661891b0 in ?? () from C:\Windows\SYSTEM32\MSVCR110.dll
[10:50:02] [debug] #2 661891c4 in ?? () from C:\Windows\SYSTEM32\MSVCR110.dll
[10:50:02] [debug] #3 70453d3b in ?? () from plugins\mysql.DLL
[10:50:02] [debug] #4 004010b6 in ?? () from samp-server.exe
[10:50:02] [debug] #5 6e4758ca in ?? () from plugins\crashdetect.DLL
[10:50:02] [debug] #6 6e47774f in ?? () from plugins\crashdetect.DLL
[10:50:02] [debug] #7 6e470834 in ?? () from plugins\crashdetect.DLL
[10:50:02] [debug] #8 6e47591a in ?? () from plugins\crashdetect.DLL
[10:50:02] [debug] #9 70457c19 in ?? () from plugins\mysql.DLL
[10:50:02] [debug] #10 004691b6 in ?? () from samp-server.exe
[10:50:02] [debug] #11 004877cb in ?? () from samp-server.exe
[10:50:02] [debug] #12 00496281 in ?? () from samp-server.exe
[10:50:02] [debug] #13 00496291 in ?? () from samp-server.exe
It seems to stop after loading the APB's.
Gecko75 is offline   Reply With Quote
Old 14/02/2014, 04:58 PM   #5
Konstantinos
Spam Machine
 
Konstantinos's Avatar
 
Join Date: Dec 2011
Posts: 11,827
Reputation: 1401
Default Re: MySQL database crashes my server

Post the line 12846.

Native cache_get_row_int crashed the server. What version of the MySQL plugin do you use?
__________________
Life is like riding a bicycle. To keep your balance, you must keep moving.

[Tutorial] How to use SQLite
[FilterScript] Tune System
Konstantinos is offline   Reply With Quote
Old 14/02/2014, 05:04 PM   #6
Gecko75
Big Clucker
 
Join Date: Jan 2013
Location: murica
Posts: 68
Reputation: 0
Default Re: MySQL database crashes my server

Line 12846.
Code:
			Factions[factionid][fLeaderRank] = cache_get_row_int(total, 36);
This is probably it, because loading the APB's is before loading the factions.

Also, I'm using BlueG's MySQL R33 plugin.
Gecko75 is offline   Reply With Quote
Old 14/02/2014, 05:08 PM   #7
Konstantinos
Spam Machine
 
Konstantinos's Avatar
 
Join Date: Dec 2011
Posts: 11,827
Reputation: 1401
Default Re: MySQL database crashes my server

I never had problems with cache_get_row_int in R33. There were few versions in which that function crashed the server such as r18. The best suggestion I can give you is to update to R37, hoping it won't crash the server anymore.
__________________
Life is like riding a bicycle. To keep your balance, you must keep moving.

[Tutorial] How to use SQLite
[FilterScript] Tune System
Konstantinos is offline   Reply With Quote
Old 14/02/2014, 05:09 PM   #8
Gecko75
Big Clucker
 
Join Date: Jan 2013
Location: murica
Posts: 68
Reputation: 0
Default Re: MySQL database crashes my server

R37 still contains all of the functions and such from R33?
Gecko75 is offline   Reply With Quote
Old 14/02/2014, 05:13 PM   #9
Konstantinos
Spam Machine
 
Konstantinos's Avatar
 
Join Date: Dec 2011
Posts: 11,827
Reputation: 1401
Default Re: MySQL database crashes my server

Most of them, yes.
You don't need to worry about it though, in case you get any errors/warnings while compiling with the R37 include (I doubt), post them here so we can help you.
__________________
Life is like riding a bicycle. To keep your balance, you must keep moving.

[Tutorial] How to use SQLite
[FilterScript] Tune System
Konstantinos is offline   Reply With Quote
Old 14/02/2014, 06:04 PM   #10
Gecko75
Big Clucker
 
Join Date: Jan 2013
Location: murica
Posts: 68
Reputation: 0
Default Re: MySQL database crashes my server

Fixed it. Ended up being an error on the Database's behalf, the rows didn't match.

Thanks for the suggestions, guys! Especially with crashdetect. I would've been sitting here staring at the script not knowing what to do.
Gecko75 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Server Crashes [Mysql] Slaykler Scripting Help 2 12/06/2013 04:09 AM
Mysql problem (server crashes) Red_Dragon. Scripting Help 6 18/04/2013 02:27 PM
MYSQL server crashes r0v3r Help Archive 8 30/01/2010 07:41 PM
[MySQL] Samp_mysql_getfield Crashes Server tom_jonez Help Archive 1 20/03/2009 11:23 PM
Server crashes on Database load wiZaK Server Support 3 18/01/2009 04:12 PM


All times are GMT. The time now is 05:26 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.