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
GuruQA
Member
Join Date: Oct 2014
Old 02-20-2015 , 15:10   Re: SQL_ThreadQuery stop server in restart or amx_map if mysql server goes offline
Reply With Quote #41

He did not stop because it has only one user

In a crowded server, lock and will only restarting


The solution would be to have something like this: https://forums.alliedmods.net/showthread.php?t=177759

Last edited by GuruQA; 02-20-2015 at 15:19.
GuruQA is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 02-20-2015 , 15:37   Re: SQL_ThreadQuery stop server in restart or amx_map if mysql server goes offline
Reply With Quote #42

Are we talking Chinese?

The solution is BETA BUILD. Download the latest (git4627+) and install.

Is that so hard?
__________________
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
GuruQA
Member
Join Date: Oct 2014
Old 02-20-2015 , 15:54   Re: SQL_ThreadQuery stop server in restart or amx_map if mysql server goes offline
Reply With Quote #43

tested amxmodx-1.8.3-dev-git4627

and has the same problem
You need to have nerves
Even so thank you for trying to help
GuruQA is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 02-20-2015 , 16:49   Re: SQL_ThreadQuery stop server in restart or amx_map if mysql server goes offline
Reply With Quote #44

Just by curiosity, can you try this? (just mysql module for windows).

Make sure you replace properly the binary.

It may help to avoid crash at map change.
Attached Files
File Type: zip mysql_amxx.zip (2.98 MB, 67 views)
__________________

Last edited by Arkshine; 02-20-2015 at 16:59.
Arkshine is offline
GuruQA
Member
Join Date: Oct 2014
Old 02-20-2015 , 18:47   Re: SQL_ThreadQuery stop server in restart or amx_map if mysql server goes offline
Reply With Quote #45

Gave the same problem

I did another test video: https://www.youtube.com/watch?v=yb9xpk1p0dM
GuruQA is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 02-20-2015 , 19:06   Re: SQL_ThreadQuery stop server in restart or amx_map if mysql server goes offline
Reply With Quote #46

Unless I'm wrong you did not crash. But got disconnected after a defined hlds server timeout (or client?). Also in such case where mysql server suddenly lost connection, there is timeout, which is now by default 60 seconds before it closes.

Did you set the mysql timeout to a short value like 5 seconds? Since you are using latest version you can add "mysql_timeout 5" in core.ini file (or you can explicit the value in plugin too). If you lost connection you should be albe to reconnect faster and avoiding hlds server being blocked until it (or client) hits a timeout.

Try again with that.
__________________

Last edited by Arkshine; 02-20-2015 at 19:18.
Arkshine is offline
GuruQA
Member
Join Date: Oct 2014
Old 02-20-2015 , 19:24   Re: SQL_ThreadQuery stop server in restart or amx_map if mysql server goes offline
Reply With Quote #47

I just blocked my ip in mysql

Simulating a mysql offline

hlds kicked sv_timeout

when this problem in a crowded server, will only restarting the hlds

The video is bad on youtube, direct link to video in HD: http://chesspc.com/test2.wmv
GuruQA is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 02-20-2015 , 19:31   Re: SQL_ThreadQuery stop server in restart or amx_map if mysql server goes offline
Reply With Quote #48

You did not answer. Did you try with timeout of like 5 seconds defined in plugin?
__________________
Arkshine is offline
GuruQA
Member
Join Date: Oct 2014
Old 02-20-2015 , 19:39   Re: SQL_ThreadQuery stop server in restart or amx_map if mysql server goes offline
Reply With Quote #49

Quote:
Originally Posted by Arkshine View Post
You did not answer. Did you try with timeout of like 5 seconds defined in plugin?

Yes

Nothing changes
Code:
native Handle:SQL_MakeDbTuple(const host[], const user[], const pass[], const db[], timeout=5);
also dermora the old dll you passed me:
Code:
native Handle:SQL_MakeDbTuple(const host[], const user[], const pass[], const db[], timeout=5, rw_timeout=5);

Last edited by GuruQA; 02-20-2015 at 19:40.
GuruQA is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 02-21-2015 , 07:10   Re: SQL_ThreadQuery stop server in restart or amx_map if mysql server goes offline
Reply With Quote #50

Ok, I understand better. When you send thread queries to an offline mysql server and you change map, server is blocked the time all queries are processed and it takes like ~1 second (tested in local only) to figure out there is no connection. So 20 queries and server is locked for ~20 seconds. For sure it should not block the server while doing the job and could be lead to crash depending the context and plugin running. Will see if something can be improved.
__________________
Arkshine 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 08:13.


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