23.07.2011, 11:42
I have a 3way problem:
- If I use mysql_ping every second to check the connection, my server crashes.
- If I do not use mysql_ping and just refresh the mysql connection (mysql_reconnect), my server doesn't crash, but I get often this message: (Debug.txt)
- If I don't use both, my mysql server goes away.
- If I use mysql_ping every second to check the connection, my server crashes.
Код:
[12:47:15] The server has been crashed by mysql_ping at line 15181 in rr.pwn. [12:47:15] Stack trace of gamemodes\rr.amx (most recent call first): [12:47:16] #0: (null) (entry point) in rr.pwn
Код:
[18:41:43] CMySQLHandler::Query(SELECT `job` FROM `jobs` WHERE `name` = "Noah_Vosen") - Successfully executed. [18:41:43] >> mysql_store_result( Connection handle: 1 ) [18:41:43] CMySQLHandler::StoreResult() - Result was stored. [18:41:43] >> mysql_num_rows( Connection handle: 1 ) [18:41:43] CMySQLHandler::NumRows() - Returned 1 row(s) [18:41:43] >> mysql_fetch_int( Connection handle: 1 ) [18:41:43] CMySQLHandler::FetchRow() - Return: 0 [18:41:43] >> mysql_free_result( Connection handle: 1 ) [18:41:43] CMySQLHandler::FreeResult() - Result was successfully free'd. [18:41:43] >> mysql_reconnect( Connection handle: 1 ) [18:41:43] CMySQLHandler::Disconnect() - Connection was closed. [18:41:43] CMySQLHandler::Connect() - Can't connect to MySQL server on '91.82.84.98' (10048) (Error ID: 2003) [18:41:44] >> mysql_format( Connection handle: 1 ) [18:41:44] >> mysql_query( Connection handle: 1 ) [18:41:44] CMySQLHandler::Query() - You cannot call this function now. (Reason: Connection is dead) [18:41:44] >> mysql_store_result( Connection handle: 1 ) [18:41:44] CMySQLHandler::StoreResult() - There is nothing to store (Reason: Connection is dead) [18:41:44] >> mysql_num_rows( Connection handle: 1 ) [18:41:44] CMySQLHandler::NumRows() - You cannot call this function now. (Reason: Dead Connection) [18:41:44] >> mysql_fetch_int( Connection handle: 1 ) [18:41:44] CMySQLHandler::FetchRow() - You cannot call this function now. (Reason: Connection is dead) [18:41:44] >> mysql_free_result( Connection handle: 1 ) [18:41:44] CMySQLHandler::FreeResult() - There is nothing to free (Reason: Connection is dead) [18:41:44] >> mysql_reconnect( Connection handle: 1 ) [18:41:44] CMySQLHandler::Disconnect() - You cannot call this function now. (Reason: Connection is dead) [18:41:44] CMySQLHandler::Connect() - Connection was successful. [18:41:44] CMySQLHandler::Connect() - Auto-Reconnect has been enabled. [18:41:45] >> mysql_reconnect( Connection handle: 1 ) [18:41:45] CMySQLHandler::Disconnect() - Connection was closed. [18:41:45] CMySQLHandler::Connect() - Connection was successful.
Код:
[22:45:54] CMySQLHandler::Query(SELECT `user_id` FROM `users` WHERE `name` = 'Maximilien_Maurizio') - Successfully executed. [22:45:54] >> mysql_store_result( Connection handle: 1 ) [22:45:54] CMySQLHandler::StoreResult() - Result was stored. [22:45:54] >> mysql_num_rows( Connection handle: 1 ) [22:45:54] CMySQLHandler::NumRows() - Returned 1 row(s) [22:45:54] >> mysql_free_result( Connection handle: 1 ) [22:45:54] CMySQLHandler::FreeResult() - Result was successfully free'd. [22:45:54] >> mysql_format( Connection handle: 1 ) [22:45:54] >> mysql_query( Connection handle: 1 ) [22:45:54] CMySQLHandler::Query(UPDATE `users` SET `heal` = 42.527000, `x` = 251.001358,`y` = -158.046692,`z` = 1.570322,`a` = 106.713684,`interior` = 0, `vw` = 0, time = time+39 WHERE `name` = "Maximilien_Maurizio") - Successfully executed. [22:59:58] >> mysql_free_result( Connection handle: 1 ) [22:59:58] CMySQLHandler::FreeResult() - The result is already empty. [22:59:58] >> mysql_query( Connection handle: 1 ) [22:59:58] CMySQLHandler::Query(SELECT * FROM `banlist` WHERE `banned` = "Vittorio_Benedetto") - An error has occured. (Error ID: 2006, MySQL server has gone away) [22:59:58] >> mysql_store_result( Connection handle: 1 ) [22:59:58] CMySQLHandler::StoreResult() - No data to store. [22:59:58] >> mysql_num_rows( Connection handle: 1 ) [22:59:58] CMySQLHandler::NumRows() - You cannot call this function now. (Reason: Dead Connection) [22:59:58] >> mysql_free_result( Connection handle: 1 ) [22:59:58] CMySQLHandler::FreeResult() - The result is already empty. [22:59:58] >> mysql_query( Connection handle: 1 ) [22:59:58] CMySQLHandler::Query(SELECT * FROM `banlist` WHERE `banned` = "Vittorio_Benedetto") - An error has occured. (Error ID: 2006, MySQL server has gone away) [22:59:58] >> mysql_store_result( Connection handle: 1 ) [22:59:58] CMySQLHandler::StoreResult() - No data to store. [22:59:58] >> mysql_fetch_row_format( Connection handle: 1 ) [22:59:58] CMySQLHandler::FetchRow() - You cannot call this function now. (Reason: Empty Result)