One query failing while the other works - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: One query failing while the other works (
/showthread.php?tid=433433)
One query failing while the other works -
MP2 - 27.04.2013
I'm sending two queries at once using this macro:
#define mysql_query(%0) mysql_function_query(1, %0, false, "", "")
The first query sometimes (sort of rare, maybe 5% of the time) returns the error 'Lost connection to mySQL server during query' but the second one works fine.
Not sure what's causing it - it started happening about 3 days ago and I haven't touched any of that code in months.
Also, there's this weird stuff in server_log.txt:
Re: One query failing while the other works -
MP2 - 30.04.2013
This is still happening. mysql_ping sometimes returns -1. It seems to be timing out or something?
Re: One query failing while the other works -
MP2 - 05.05.2013
Nobody..?
Re: One query failing while the other works -
Dj_maryo1993 - 05.05.2013
Try to make a timer of 20 seconds to mysql_ping the DB , to keep the connection alive .
I remember i had this problem too , it was on a free db host , i swiched the hosting and seems to be ok