MySQL why closes connection ...
#1

Hello guys since ive changed my gm it works correctly BUT after some times the connection closed but i only close the connection on server gmx

i have to restart the server to get my gm back working. it cant be my root.

i use strickenkid's plugin and OnGameModeInit is this:

pawn Код:
mysql_init(LOG_ONLY_ERRORS);
    mysql_connect(host,user,pass,db);

is there a reconnect code ?

//edit anyone else ?
Reply
#2

Could it be your database closing the connection? If you can, check the log for the actual MySQL server...

Otherwise, it's probably a query you have running that's causing the connection to terminate. It's best to log everything, especially when debugging things like this. Check your server logs and see if something stands out to you!
Reply
#3

there is nothing wrong i free results after quering and using the results
Reply
#4

Quote:
Originally Posted by Tigerkiller
Посмотреть сообщение
there is nothing wrong i free results after quering and using the results
Quote:

i have to restart the server to get my gm back working

Are you sure there's nothing wrong?

Did you even care to check the logs? I'm not going to help someone who is so arrogant they won't even try doing what I said!
Reply
#5

allready did! my problem is only this that the connection closes
Reply
#6

Quote:
Originally Posted by Tigerkiller
Посмотреть сообщение
allready did! my problem is only this that the connection closes
It's either the database closing the connection, or you're executing queries which are causing the connection to terminate.
Reply
#7

hmm iam gonna check over 50 queries now.

and it cant be the root because i tested it on samp4you and gta-servers

iam going to response tomorrow with the result and iam going to check the wiki for the plugin too
Reply
#8

Quote:
Originally Posted by Tigerkiller
Посмотреть сообщение
hmm iam gonna check over 50 queries now.
You don't have to check every single query you have, unless you wrote your entire mode without testing everything! Just check the queries you wrote last and you'll probably find your mistake(s). If you had a decent logging system (i.e. with BlueG's plugin), it would be simple for you to find the problem queries.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)