SQL

Connect with other users about what to run on your webhosting (and how to run it) here.
Post Reply
Ronaldo
New to forums
New to forums
Posts: 8
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Mon Nov 01, 2010 7:06 pm

SQL

Post by Ronaldo »

I've installed AmxBans but for some reasons it fails to connect to sql from time to time. When i boot the server, it connects very well as the logs show:

[amxbans_main.amxx] [AMXBans] Received DB Info Tuple from amxbans_core: 2 | amx
[amxbans_main.amxx] [AMXBans] The server IP:PORT is:
[amxbans_main.amxx] [AMXBans] No Reasons found in Database. Static reasons were loaded.
[amxbans_main.amxx] [AMXBANS DEBUG] UPDATE `amx_serverinfo` SET `timestamp` = '', `hostname` = 'Server', `gametype` = 'cstrike', `amxban_version` = '1.6', `amxban_menu` = '1' WHERE `address` =
[amxbans_main.amxx] [AMXBans] AMXBans Gm 1.6 is online, date: 14:25 26.04.2011

But after some minutes, it fails to connect to the sql and the server crashes every time it fails:

[amxbans_main.amxx] [AMXBans] Connection failed!
[amxbans_main.amxx] [AMXBans] Message: Can't connect to MySQL server on '208.146.35.1' (10060) (2003)
[amxbans_main.amxx] [AMXBans] Query statement: SELECT `bid`, `ban_created`, `ban_length`, `cs_ban_reason`, `admin_nick`, `admin_id`, `admin_ip`, `player_nick`, `player_id`, `player_ip`, `server_name`, `server_ip`, `ban_type` FROM `amx_bans` WHERE ((`player_id` = 'STEAM_0:0:29302041' AND `ban_type` = 'S') OR (`player_ip` = '181.29.212.71' AND `ban_type` = 'SI')) AND `expired` = '0';
[amxbans_main.amxx] [AMXBans] Connection failed!

Anyone can help me?
balon
New to forums
New to forums
Posts: 2
Joined: Sat Sep 12, 2015 6:56 pm

Re: SQL

Post by balon »

So normally (10060), from my experience, has to do with the networking.

First question is, is this webhosting through NFOServers, or do you have an sql server installed on an unmanaged machine?

If it is unmanaged, you can double check your sql config, it varies across different operating systems, though a google search such as "debian mysql config location" will get you the most likely path to yours.

I would check to ensure that the mysql server isn't bound to localhost (unless it's on the same machine) and that you have set your max_connections high enough to be able to handle anything you throw at it. If it is set to the default, which I believe is 300, you may be flooding this connection, which can cause the issue you are seeing below (sql going offline/crashing).

Lastly, if this is an NFO Webhosting, a product I've never used, if you have firewall access I suggest you ensure 3306 is open, the SQL-port, and there aren't rules blocking x-amount of connections on that port. Anything further, if it is a webhosting plan, you should probably direct to their staff.
Post Reply