Losing connection to MySQL Database

Read log files for errors! If this fails, come here for help

Moderator: Forum Moderator

Locked
RevMortis
Peon
Posts: 7
Joined: Wed Aug 31, 2005 6:57 pm
Contact:

Losing connection to MySQL Database

Post by RevMortis » Wed Sep 07, 2005 11:47 pm

Unable to retrieve XP from a mySQL server. The Mysql database is on a remote machine.

MySQL 4.0.25-standard
console log wrote: [AMXX] Loaded 3 admins from database
...
[WAR3FT] Connection to MySQL Database successful (1)
...
L 09/08/2005 - 01:29:48: [warcraft3FT.amxx] [WAR3FT] DBI XP_Retreive error: Lost
connection to MySQL server during query (-1)

Code: Select all

amx_plugins
Currently loaded plugins:
name               version  author            file             status
Admin Base (SQL)   1.50     AMXX Dev Team     admin_sql.amxx   running
Admin Commands     1.50     AMXX Dev Team     admincmd.amxx    running
Admin Help         1.50     AMXX Dev Team     adminhelp.amxx   running
Slots Reservation  1.50     AMXX Dev Team     adminslots.amxx  running
Multi-Lingual Sys  1.50     AMXX Dev Team     multilingual.am  running
Menus Front-End    1.50     AMXX Dev Team     menufront.amxx   running
Commands Menu      1.50     AMXX Dev Team     cmdmenu.amxx     running
Players Menu       1.50     AMXX Dev Team     plmenu.amxx      running
Teleport Menu      1.50     AMXX Dev Team     telemenu.amxx    running
Maps Menu          1.50     AMXX Dev Team     mapsmenu.amxx    running
Admin Chat         1.50     AMXX Dev Team     adminchat.amxx   running
Anti Flood         1.50     AMXX Dev Team     antiflood.amxx   running
Scrolling Message  1.50     AMXX Dev Team     scrollmsg.amxx   running
Info. Messages     1.50     AMXX Dev Team     imessage.amxx    running
Admin Votes        1.50     AMXX Dev Team     adminvote.amxx   running
NextMap            1.50     AMXX Dev Team     nextmap.amxx     running
Nextmap Chooser    1.50     AMXX Dev Team     mapchooser.amxx  running
TimeLeft           1.50     AMXX Dev Team     timeleft.amxx    running
Pause Plugins      1.50     AMXX Dev Team     pausecfg.amxx    running
Stats Configurati  1.50     AMXX Dev Team     statscfg.amxx    running
DoD Stats          1.50     AMXX Dev Team     stats.amxx       running
DoD Sounds Precac  1.50     AMXX Dev Team     statssounds.amx  running
Stats Logging      1.50     AMXX Dev Team     stats_logging.a  running
Warcraft 3 Frozen  2.2.5    Pimp Daddy (OoTO  warcraft3FT.amx  debug
24 plugins, 23 running

User avatar
GUNN3R17
Footman
Posts: 149
Joined: Wed Jul 06, 2005 5:24 pm
Location: Brea, CA
Contact:

Post by GUNN3R17 » Thu Sep 08, 2005 12:58 am

post ur server specs and connection

are u using a celeron? or a p4 with no ht?

User avatar
Lazarus Long
Lead PITA SOB
Posts: 618
Joined: Tue Jul 05, 2005 9:24 pm

Re: Losing connection to MySQL Database

Post by Lazarus Long » Thu Sep 08, 2005 4:35 am

Hello:

@ RevMortis:
RevMortis wrote:Unable to retrieve XP from a mySQL server. The Mysql database is on a remote machine.
How remote is it? In another machine in the LAN, somewhere in the state or "I don't have an idea but I wouldn't like to walk all the way there" remote?
RevMortis wrote:
console log wrote: [AMXX] Loaded 3 admins from database
...
[WAR3FT] Connection to MySQL Database successful (1)
...
L 09/08/2005 - 01:29:48: [warcraft3FT.amxx] [WAR3FT] DBI XP_Retreive error: Lost
connection to MySQL server during query (-1)
This is clearly a timeout situation, even if your server got away with it just before timeouting I bet it would get so much lag that at a round end everybody would complain or be booted off the game.

Is this a fresh server or it started to behave like this sudently (if it was working it might be a connection and/or hardware "just about to fail" situation)? Why do you need to save to MySQL anyway? Any special reason besides "the vault is a good piece of s**t"?

Now about solutions, if it isn't a hardware problem, you have 3 (besides the obvious one of going back to the vault):
  1. If you must use that particular server you'll have to fiddle (a lot) with your routing tables (and this isn't guaranteed to work);
  2. If you really need MySQL get a closer located server (I mean closer as in "if I look around I can see it");
  3. If you are an adventure kind of person you can give SQLite a chance.
Oh, and by the way:
GUNN3R17 wrote:post ur server specs and connection
You should follow How to ask for and get help in the Warcraft 3 FT forum when requesting assistance.


@ GUNN3R17:
GUNN3R17 wrote:are u using a celeron? or a p4 with no ht?
I'm curious, why this particular question? Just to see if the server was on a fast enough processor or any possible relation of HT with timeouts?

Best regards,
Lazarus

User avatar
Geesu
<b>King of the world!</b>
Posts: 3159
Joined: Tue Jul 05, 2005 9:24 pm
Contact:

Post by Geesu » Thu Sep 08, 2005 11:07 am

find the SQL server's IP address, then do a traceroute to it from you CS server... post the results here
No Support via PM

User avatar
Lazarus Long
Lead PITA SOB
Posts: 618
Joined: Tue Jul 05, 2005 9:24 pm

Post by Lazarus Long » Thu Sep 08, 2005 11:17 am

RevMortis:
Geesu wrote:find the SQL server's IP address, then do a traceroute to it from you CS server... post the results here
Or use the DNS name, a fairly new traceroute or (even better if your game server is running Linux) tracepath will accept the machine name also.
Lazarus

User avatar
GUNN3R17
Footman
Posts: 149
Joined: Wed Jul 06, 2005 5:24 pm
Location: Brea, CA
Contact:

Post by GUNN3R17 » Thu Sep 08, 2005 6:12 pm

i had that same error on my server because we had to many game servers on 1 host server with a small internet connection....when things got full it caused that error in my logs too

im not sure if it was cpu/ram/ or internet connection getting maxxed out but after we upgraded the host it went away

User avatar
Lazarus Long
Lead PITA SOB
Posts: 618
Joined: Tue Jul 05, 2005 9:24 pm

Post by Lazarus Long » Thu Sep 08, 2005 6:23 pm

Hi, GUNN3R17:
GUNN3R17 wrote:i had that same error on my server because we had to many game servers on 1 host server with a small internet connection....when things got full it caused that error in my logs too

im not sure if it was cpu/ram/ or internet connection getting maxxed out but after we upgraded the host it went away
Oh, OK. I was puzzled about the HT reference. Since I never had any Pentium II/III/IV processor based server I was wondering if there was any issue related to HT or non-HT that I was unaware of.

Thanks for the info.

(if RevMortis had posted his server specs as he should we could have ruled out a lot of possibilities...)

Cheers,
Lazarus

RevMortis
Peon
Posts: 7
Joined: Wed Aug 31, 2005 6:57 pm
Contact:

Post by RevMortis » Sun Sep 11, 2005 8:26 pm

Sorry for not getting back to you quickly. I work full time and then some... :wink: Hopefully we'll get this straightened out eventually...

If I remember correctly, our server [Dual Xeon 2.(something) Ghrz] is hosted on a gigabit ethernet connection in a data center in Reston, VA. (Defender uses that datacenter).

We are currently running 2 public and 2 private/match servers full time - one 24 slot and 3 13 slot servers. Ocassionally I pring down one of the 13 slot servers and bring up a test server (Like the WAR3ft server).

Here is a Tracert to the SQL database's server. (Nice eh?)

Code: Select all

Tracing route to alliedarmy.net [66.36.242.136]
over a maximum of 30 hops:

  1   <10 ms   <10 ms   <10 ms  1.144.22.69.defenderhosting.com [69.22.144.1]
  2     6 ms   <10 ms   <10 ms  63.218.94.93
  3   <10 ms   <10 ms   <10 ms  ge6-0-1.core1.iad1.hopone.net [66.36.224.213]
  4     1 ms     1 ms     1 ms  ge8-0.core1.dca2.hopone.net [66.36.224.17]
  5     2 ms     2 ms     1 ms  vl2.msfc1.distb2.dca2.hopone.net [66.36.224.229]

  6     2 ms     5 ms     2 ms  nags.nagameservers.com [66.36.242.136]

RevMortis
Peon
Posts: 7
Joined: Wed Aug 31, 2005 6:57 pm
Contact:

Post by RevMortis » Sun Sep 11, 2005 8:30 pm

Oh, One more thing... We are a DoD clan. Not CS-H... :twisted:

But on a serious note. I may consider SQlite. The 3 main reasons for chosing MySQL are 1- the ability to run external programs against the datafiles for Reporting and such, 2- because I have more experience with MySQL and am comfortable with it, and 3- in case we want to "share" the XP bonuses with multiple servers. I don't have a problem with SQLite, I just don't have ANY exposure to it...

-Rev. Mortis

User avatar
Lazarus Long
Lead PITA SOB
Posts: 618
Joined: Tue Jul 05, 2005 9:24 pm

Post by Lazarus Long » Mon Sep 12, 2005 2:01 am

RevMortis:

Good specs, so we can rule out both hardware power and connectivity.

Now for what else is the MySQL server being used? And what are it's specs? Is it possible to set a test MySQL server on localhost from the gameservers?

It might be your MySQL server timing out either due to configuration or database problems. Did you check your databases for corruption?

You realize that you can poll a SQLite database the same way and with tha same tools as you poll a MySQL one, right? For instance PHP, Perl and Apache all have SQLite modules. And you can point all your servers to the same database, it supports multiple connections. The only thing you can't do is connect from multiple machines to the same database (actually not even this in impossible if you have the database file in a shared medium and you map the shared medium in each machine). And the hassle of setting it up is almost none you don't even have to do anything besides editing modules.ini to activate the module and sql.cfg to have amx_sql_db point to where you want the database stored (mind that this will be from AMX Mod X 1.56 onward, for the time being you'll have to add working modules to your system).

Oh I remembered one more thing related to MySQL, are you using the original modules that came with AMX Mod X 1.50? Did it gave the error from the very begining or it started after it worked OK? If from the beginning try these modules out if running Linux or post and I'll build Windows ones (it's not sure they work for everybody but you might try them out anyway).

Best regards,
Last edited by Lazarus Long on Mon Sep 12, 2005 1:16 pm, edited 2 times in total.
Lazarus

RevMortis
Peon
Posts: 7
Joined: Wed Aug 31, 2005 6:57 pm
Contact:

Post by RevMortis » Mon Sep 12, 2005 1:01 pm

Interesting.

I'm using whatever AMXX modules came in the 2.2.5 version of War3FT as of a couple weeks ago...

AMXmodX Ver 1.50 and MetaMod 1.18.0.24.

I'll try SQLite... Can't hurt ;)

User avatar
Lazarus Long
Lead PITA SOB
Posts: 618
Joined: Tue Jul 05, 2005 9:24 pm

Post by Lazarus Long » Sat Sep 17, 2005 6:30 am

Assuming the problem is dealt with.

Locked.

(The original author should PM me to reopen it)
Lazarus

Locked