Raised This Month: $51 Target: $400
 12% 

SQL_ThreadQuery stop server in restart or amx_map if mysql server goes offline


Post New Thread Reply   
 
Thread Tools Display Modes
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-01-2014 , 08:28   Re: SQL_ThreadQuery stop server in restart or amx_map if mysql server goes offline
Reply With Quote #11

Seen on SM an issue similar about #9 and maybe #10: https://github.com/alliedmodders/sourcemod/pull/165 ; maybe this could help? I'm willing to provide a binary if you tell me you can test it.
__________________

Last edited by Arkshine; 12-01-2014 at 08:29.
Arkshine is offline
GuruQA
Member
Join Date: Oct 2014
Old 12-01-2014 , 10:03   Re: SQL_ThreadQuery stop server in restart or amx_map if mysql server goes offline
Reply With Quote #12

yes

You can send
I test on my server

My server uses an online rank and falls when it is connectionless
GuruQA is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-04-2014 , 14:04   Re: SQL_ThreadQuery stop server in restart or amx_map if mysql server goes offline
Reply With Quote #13

Sorry for the wait. I hope binary will load.

I've added a new rw_timeout param to SQL_MakeDbTuple and SQL_MakeStdTuple to set read/write timeout value. So replace the .inc as well and recompile your plugin with the value you want.
A guy here tried with 5 for connect and read/write timeout, and he said he passed from constant crash to 10 days uptime. So I guess you can try first with .rw_timeout = 5 (eventually timeout but I suspect you already tried).

Make sure you replace properly binary.
Attached Files
File Type: zip mysql.zip (1.68 MB, 115 views)
__________________

Last edited by Arkshine; 12-04-2014 at 18:21.
Arkshine is offline
GuruQA
Member
Join Date: Oct 2014
Old 12-04-2014 , 15:58   Re: SQL_ThreadQuery stop server in restart or amx_map if mysql server goes offline
Reply With Quote #14

He worked in windows

But in linux this error:

( 20) Load fails: Module/Library Class "sqlx" required for plugin. Check module
s.ini.

The mod mysql_amxx_i386.so does not start



The problem is that my server with DDOS attack
The admins give restart or change the map at the time of lag
Thinking it's lag in server
And with that the Server falls


Has a way for you to do something that the Server does not fall when you change the map without connection?

Example: https://forums.alliedmods.net/showthread.php?t=177759

Last edited by GuruQA; 12-04-2014 at 16:25.
GuruQA is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-04-2014 , 18:24   Re: SQL_ThreadQuery stop server in restart or amx_map if mysql server goes offline
Reply With Quote #15

My bad, I've compiled linux binary against mysql 5.6 when the version used by AMXX is 5.1. This loads now.
I've re-uploaded the package.

If connection is lost or with read/write operation stucked at map change, giving a short timeout like 5 should be enough to avoid issue.
At least it worked for the guy I told above.
__________________

Last edited by Arkshine; 12-04-2014 at 18:26.
Arkshine is offline
GuruQA
Member
Join Date: Oct 2014
Old 12-05-2014 , 08:51   Re: SQL_ThreadQuery stop server in restart or amx_map if mysql server goes offline
Reply With Quote #16

I'm testing
Waiting for the DDOS attacks srsrrs

An example:

If I have a single mysql server

And have 30 servers sending information to this mysql server


If the mysql server goes off and someone of 30 servers change the map?

The servers will fall

It would not have a way to restart the server with mysql OFF?
GuruQA is offline
GuruQA
Member
Join Date: Oct 2014
Old 12-05-2014 , 13:56   Re: SQL_ThreadQuery stop server in restart or amx_map if mysql server goes offline
Reply With Quote #17

Got better, fast reconnect
but my server crashed, the crazy admin invented to change the map when he was getting DDOS attacks
GuruQA is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-05-2014 , 19:04   Re: SQL_ThreadQuery stop server in restart or amx_map if mysql server goes offline
Reply With Quote #18

No idea really. Easy way is to tell your admins to not change map, then it should solve your issue.


By the way, tried to compile module against mysql 5.5.40 just by curiosity. It seems it compiles fine for both windows/linux.
I don't know the changes, probably a lot of fixes/performance improvement from 5.1. If you want, give a try. Maybe it will help, no idea.
It includes the read/write timeout parameter as well.
Attached Files
File Type: zip mysql-5.5.zip (1.71 MB, 117 views)
__________________

Last edited by Arkshine; 12-06-2014 at 03:17.
Arkshine is offline
GuruQA
Member
Join Date: Oct 2014
Old 12-05-2014 , 20:10   Re: SQL_ThreadQuery stop server in restart or amx_map if mysql server goes offline
Reply With Quote #19

mysql-5.5 tested in windows and linux
is working

This helped me a lot, at least now he reconnects fast

Thank you


If you have more tests, just post what I do tests
GuruQA is offline
Cv3
Junior Member
Join Date: Sep 2014
Old 12-11-2014 , 16:57   Re: SQL_ThreadQuery stop server in restart or amx_map if mysql server goes offline
Reply With Quote #20

Code:
Lost connection to MySQL server at 'reading initial communication packet', system error: 11
This comes and goes around using the last attachment on a debian wheezy 5.5 mysql and all the mods using mysql are loaded from time to time.

Last edited by Cv3; 12-11-2014 at 16:57.
Cv3 is offline
Reply



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

Forum Jump


All times are GMT -4. The time now is 12:59.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode