Urgent MYSQL Question <-- Thank you!
#1

My MYSQL Database is acting up. When I'm running a mysql database off my computer with XXAMP it worked perfectly everything runs smoothly. But I have it on my Dedicated Server and the MySQL database freezes up when it trys to load vehicles. It has no problem loading anything thing else, but as soon as someone buys a car the MySQL Database won't connect anymore.

RUNNING OFF MY COMPUTER IT BOOTS FINE
Код:
[18:27:37] [MySQL] Connecting to 'localhost'...
[18:27:37] [MySQL] Connected to 'localhost' successfully.
[18:27:37] [OnGameModeInit] Textdraws loaded.
[18:27:37] [OnGameModeInit] Elevator initialized.
[18:27:37] [OnGameModeInit] Vehicle gas set to 100, points reset, unallied families reset
[18:27:37] [OnGameModeInit] Boxer.cfg loaded.
[18:27:37] rcon_password = "1234"  (string)
[18:27:37] [OnGameModeInit] Stuff.cfg loaded.
[18:27:37] [OnGameModeInit] JobIcons.cfg loaded.
[18:27:37] [OnGameModeInit] IRC channels loaded.
[18:27:37] [OnGameModeInit] Families.cfg loaded.
[18:27:37] [OnGameModeInit] Weed.cfg loaded.
[18:27:37] [OnGameModeInit] Businesses.cfg loaded (business count: 3)
[18:27:37] [OnGameModeInit] Garages.cfg loaded (garage count: 1)
[18:27:37] [OnGameModeInit] Houses.cfg loaded (house count: 1)
[18:27:37] [OnGameModeInit] Drive Thrus loaded.
[18:27:37] [OnGameModeInit] BEFORE payphone.cfg loaded.
[18:27:37] [OnGameModeInit] payphone.cfg loaded.(gate count: 1)
[18:27:37] [OnGameModeInit] Gates.cfg loaded (gate count: 1)
[18:27:37] [OnGameModeInit] Objects.cfg loaded (object count: 0)
[18:27:37] [OnGameModeInit] FamilyHQs.cfg loaded.
[18:27:37] [OnGameModeInit] FactionHQs.cfg loaded.
[18:27:37] [OnGameModeInit] Entrances loaded.
[18:27:37] [OnGameModeInit] FacGates.cfg loaded.
[18:27:37] [OnGameModeInit] FactionPay.cfg loaded.
[18:27:37] [OnGameModeInit] Factions.cfg loaded.
[18:27:37] [OnGameModeInit] FactionSkins.cfg loaded.
[18:27:37] [OnGameModeInit] Points loaded.
[18:27:37] [OnGameModeInit] Faction duty menus loaded.
[18:27:37] [OnGameModeInit] Dynamic pickups loaded.
[18:27:37] [OnGameModeInit] Family gates loaded.
[18:27:37] [OnGameModeInit] Divisions loaded.
[18:27:37] [OnGameModeInit] Gamemode text set to: WLS v1.0
[18:27:37] [OnGameModeInit] Time set to 2:00.
[18:27:37] [OnGameModeInit] Added player skins to class selection.
[18:27:37] [OnGameModeInit] 20 buttons loaded.
[18:27:37] [OnGameModeInit] Dynamic buttons loaded.
[18:27:37] [OnGameModeInit] Airport licenses & gate loaded.
[18:27:37] [OnGameModeInit] Dynamic objects loaded - around 5,000 - 5,500.
[18:27:37] [OnGameModeInit] Pickups Loaded.
[18:27:37] [OnGameModeInit] Timers started.
[18:27:37] [OnGameModeInit] NPC loading... (if enabled).
[18:27:38] [OnGameModeInit] Permanent vehicles loading...
[18:27:38] Loading vehicle 43...
[18:27:38] [OnGameModeInit] Dealership vehicles loading...
[18:27:38] Authenticated successfully.




WITH MY DEDICATED SERVER
Код:
128612 	
128613 	[00:36:29] [MySQL] Connecting to 'localhost'...
128614 	[00:36:29] [MySQL] Connected to 'localhost' successfully.
128615 	[00:36:29] [OnGameModeInit] Textdraws loaded.
128616 	[00:36:29] [OnGameModeInit] Elevator initialized.
128617 	[00:36:29] [OnGameModeInit] Vehicle gas set to 100, points reset, unallied families reset
128618 	[00:36:29] [OnGameModeInit] Boxer.cfg loaded.
128619 	[00:36:29] rcon_password = "1234" (string)
128620 	[00:36:29] [OnGameModeInit] Stuff.cfg loaded.
128621 	[00:36:29] [OnGameModeInit] JobIcons.cfg loaded.
128622 	[00:36:29] [OnGameModeInit] IRC channels loaded.
128623 	[00:36:29] [OnGameModeInit] Families.cfg loaded.
128624 	[00:36:29] [OnGameModeInit] Weed.cfg loaded.
128625 	[00:36:29] [OnGameModeInit] Businesses.cfg loaded (business count: 4)
128626 	[00:36:29] [OnGameModeInit] Garages.cfg loaded (garage count: 1)
128627 	[00:36:30] [OnGameModeInit] Houses.cfg loaded (house count: 100)
128628 	[00:36:30] [OnGameModeInit] Drive Thrus loaded.
128629 	[00:36:30] [OnGameModeInit] BEFORE payphone.cfg loaded.
128630 	[00:36:30] [OnGameModeInit] payphone.cfg loaded.(gate count: 100)
128631 	[00:36:30] [OnGameModeInit] Gates.cfg loaded (gate count: 1)
128632 	[00:36:30] [OnGameModeInit] Objects.cfg loaded (object count: 0)
128633 	[00:36:30] [OnGameModeInit] FamilyHQs.cfg loaded.
128634 	[00:36:30] [OnGameModeInit] FactionHQs.cfg loaded.
128635 	[00:36:30] [OnGameModeInit] Entrances loaded.
128636 	[00:36:30] [OnGameModeInit] FacGates.cfg loaded.
128637 	[00:36:30] [OnGameModeInit] FactionPay.cfg loaded.
128638 	[00:36:30] [OnGameModeInit] Factions.cfg loaded.
128639 	[00:36:30] [OnGameModeInit] FactionSkins.cfg loaded.
128640 	[00:36:30] [OnGameModeInit] Points loaded.
128641 	[00:36:30] [OnGameModeInit] Faction duty menus loaded.
128642 	[00:36:30] [OnGameModeInit] Dynamic pickups loaded.
128643 	[00:36:30] [OnGameModeInit] Family gates loaded.
128644 	[00:36:30] [OnGameModeInit] Divisions loaded.
128645 	[00:36:30] [OnGameModeInit] Gamemode text set to: WLS v1.0
128646 	[00:36:30] [OnGameModeInit] Time set to 2:00.
128647 	[00:36:30] [OnGameModeInit] Added player skins to class selection.
128648 	[00:36:30] [OnGameModeInit] 20 buttons loaded.
128649 	[00:36:30] [OnGameModeInit] Dynamic buttons loaded.
128650 	[00:36:30] [OnGameModeInit] Airport licenses & gate loaded.
128651 	[00:36:30] [OnGameModeInit] Dynamic objects loaded - around 5,000 - 5,500.
128652 	[00:36:30] [OnGameModeInit] Pickups Loaded.
128653 	[00:36:30] [OnGameModeInit] Timers started.
128654 	[00:36:30] [OnGameModeInit] NPC loading... (if enabled).
128655 	[00:36:30] [OnGameModeInit] Permanent vehicles loading...
128656 	[00:36:30] Loading vehicle 44...

Loading vehicle 44... <-- Then just never continues. This is so frustrating guys please help! Anyone who helps will get a Rep right away.

If you need any other info just reply. Thanks!!!!
Reply
#2

Most likely crashing, have you tried the crash detect plugin? Also, show the code that loads your vehicles
Reply
#3

Okay I'll try that out, Heres the code to load the vehicles.




Код:
	    format(query, sizeof(query), "SELECT * FROM `vehicles` WHERE `veh_id` = '%d'", i);
		mysql_query(query);
		mysql_store_result();
		if (mysql_num_rows())
	    {
	        new model, Float:position[4];
            while (mysql_retrieve_row())
            {
	    		mysql_fetch_field_row(data, "veh_id");
				printf("Loading vehicle %d...", strval(data));
				VehicleEnum[vehicleid][veh_id] = strval(data);

                mysql_fetch_field_row(data, "veh_model"); model = strval(data);
				mysql_fetch_field_row(data, "veh_x"); position[0] = floatstr(data);
                mysql_fetch_field_row(data, "veh_y"); position[1] = floatstr(data);
                mysql_fetch_field_row(data, "veh_z"); position[2] = floatstr(data);
                mysql_fetch_field_row(data, "veh_rot"); position[3] = floatstr(data);
		        vehicleid = AddStaticVehicleEx(model, position[0], position[1], position[2], position[3], 1, 1, -1);

		        mysql_fetch_field_row(data, "veh_plate"); format(VehicleEnum[vehicleid][veh_plate], MAX_PLATE_LENGTH + 1, data);
		        mysql_fetch_field_row(data, "veh_owner"); format(VehicleEnum[vehicleid][veh_owner], MAX_PLAYER_NAME, data);

                mysql_fetch_field_row(data, "veh_price");
	  			VehicleEnum[vehicleid][veh_model] = model;
		        VehicleEnum[vehicleid][veh_owned] = 1;
		        VehicleEnum[vehicleid][veh_price] = strval(data);
		        VehicleEnum[vehicleid][veh_x] = position[0];
		        VehicleEnum[vehicleid][veh_y] = position[1];
		        VehicleEnum[vehicleid][veh_z] = position[2];
		        VehicleEnum[vehicleid][veh_rot] = position[3];

				for(new c = 1, var[32]; c < 18; c++)
				{
				    format(var, sizeof(var), "veh_component%d", c);
				    mysql_fetch_field_row(data, var);
				    VehicleEnum[vehicleid][veh_comp][c] = strval(data);
				}
				mysql_fetch_field_row(data, "veh_color1"); VehicleEnum[vehicleid][veh_colors][1] = strval(data);
				mysql_fetch_field_row(data, "veh_color2"); VehicleEnum[vehicleid][veh_colors][2] = strval(data);
				mysql_fetch_field_row(data, "veh_paintjob"); VehicleEnum[vehicleid][veh_paintjob] = strval(data);
				mysql_fetch_field_row(data, "veh_locked"); VehicleEnum[vehicleid][veh_locked] = strval(data);
				mysql_fetch_field_row(data, "veh_slot"); VehicleEnum[vehicleid][veh_slot] = strval(data);
				mysql_fetch_field_row(data, "veh_int"); VehicleEnum[vehicleid][veh_int] = strval(data);
				mysql_fetch_field_row(data, "veh_world"); VehicleEnum[vehicleid][veh_world] = strval(data);
				mysql_fetch_field_row(data, "veh_neon"); VehicleEnum[vehicleid][veh_neon] = strval(data);
				mysql_fetch_field_row(data, "veh_impounded"); VehicleEnum[vehicleid][veh_impounded] = strval(data);
				mysql_fetch_field_row(data, "veh_impoundprice"); VehicleEnum[vehicleid][veh_impoundprice] = strval(data);
	            mysql_fetch_field_row(data, "veh_haslock"); VehicleEnum[vehicleid][veh_haslock] = strval(data);
	            mysql_fetch_field_row(data, "veh_registerdate1"); VehicleEnum[vehicleid][veh_registerdate][1] = strval(data);
	            mysql_fetch_field_row(data, "veh_registerdate2"); VehicleEnum[vehicleid][veh_registerdate][2] = strval(data);
	            mysql_fetch_field_row(data, "veh_registerdate3"); VehicleEnum[vehicleid][veh_registerdate][3] = strval(data);
	            mysql_fetch_field_row(data, "veh_registerdate4"); VehicleEnum[vehicleid][veh_registerdate][4] = strval(data);
	            mysql_fetch_field_row(data, "veh_registerdate5"); VehicleEnum[vehicleid][veh_registerdate][5] = strval(data);
	            mysql_fetch_field_row(data, "veh_registerdate6"); VehicleEnum[vehicleid][veh_registerdate][6] = strval(data);
	            mysql_fetch_field_row(data, "NeonActivated"); NeonActivated[vehicleid] = strval(data);
	            mysql_fetch_field_row(data, "veh_trunkgun1"); VehicleEnum[vehicleid][veh_trunkgun1] = strval(data);
		        mysql_fetch_field_row(data, "veh_trunkgun2"); VehicleEnum[vehicleid][veh_trunkgun2] = strval(data);
		        mysql_fetch_field_row(data, "veh_trunkgun3"); VehicleEnum[vehicleid][veh_trunkgun3] = strval(data);
		        mysql_fetch_field_row(data, "veh_trunkgun4"); VehicleEnum[vehicleid][veh_trunkgun4] = strval(data);
		        mysql_fetch_field_row(data, "veh_trunkarmor"); VehicleEnum[vehicleid][veh_trunkarmor] = floatstr(data);
	            mysql_fetch_field_row(data, "veh_trunkcocaine"); VehicleEnum[vehicleid][veh_trunkcocaine] = strval(data);
	        	mysql_fetch_field_row(data, "veh_trunkweed"); VehicleEnum[vehicleid][veh_trunkweed] = strval(data);
	        	mysql_fetch_field_row(data, "veh_trunkmeth"); VehicleEnum[vehicleid][veh_trunkmeth] = strval(data);
	        	mysql_fetch_field_row(data, "veh_trunkheroin"); VehicleEnum[vehicleid][veh_trunkheroin] = strval(data);
	         	mysql_fetch_field_row(data, "veh_trunkmats"); VehicleEnum[vehicleid][veh_trunkmats] = strval(data);
	         	mysql_fetch_field_row(data, "veh_trunkcash"); VehicleEnum[vehicleid][veh_trunkcash] = strval(data);
			}
			ModifyVehicle(vehicleid);
			LinkVehicleToInterior(vehicleid, VehicleEnum[vehicleid][veh_int]);
			SetVehicleVirtualWorld(vehicleid, VehicleEnum[vehicleid][veh_world]);
			if(VehicleEnum[vehicleid][veh_locked]) LockVehicle(vehicleid);
			if (NeonActivated[vehicleid])
			{
			    AddNeonToVehicle(-1, vehicleid, VehicleEnum[vehicleid][veh_neon]);
			}
			if(vehicleid != INVALID_VEHICLE_ID) ownedcars++;
			if (IsABicycle(vehicleid) || IsATrain(vehicleid) || IsVehicleRCVehicle(vehicleid)) SetVehicleEngine(vehicleid, 1);
			else SetVehicleEngine(vehicleid, 0);
			printf("Loading vehicle %d... AFTER", strval(data));
		}
		mysql_free_result();
Reply
#4

Can Anyone help me with this please the Log Only has this in it?...

Код:
[Thu Oct 31 01:02:43 2013] -------------------------
[Thu Oct 31 01:02:43 2013]      Logging Started
[Thu Oct 31 01:02:43 2013] -------------------------
[Thu Oct 31 01:04:36 2013] -------------------------
[Thu Oct 31 01:04:36 2013]      Logging Started
[Thu Oct 31 01:04:36 2013] -------------------------
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)