AL, Marklos, can either of you guys see your way to fixing this? It's an error I'm getting in the NWNX log that's stopping me (anyone) from logging on to the server.
Thanks.
! SQL Error: MySQL server has gone away.
- AcadiusLost
- Chosen of Forumamus, God of Forums
- Posts: 5061
- Joined: Tue Oct 19, 2004 8:38 am
- Location: Montara, CA [GMT -8]
- Contact:
Indio: This errors happens on a failed SQL transaction, it throws the xp_mysql plugin for NWNx4 into an errorstate and breaks persistency of all sorts, so the ACR blocks player logins while it's disconnected.
The way to restablish DB connection is just to reload the module via NWNx4 - I wrote code that watches for these problems, and sends a command to NWNx4 to automate this process that's currently working on my hosted 003 copy and the OAS2 over on Marklos' machine, but it requires installing another NWNx4 plugin to function.
It's the first entry on this page: NWNx4/System 0.0.0.5
http://www.nwnx.org/index.php?id=65
You just need to install the plugin, no need to import the erf or make any scripting changes (provided you've updated haks via the www.alandfaraway.org Worldgate and recompiled scripts successfully).
While you're at it, you may want to also install the xp_chat plugin:
http://data.virusman.ru/nwn/nwnx4/xp_chat-0.3.3.rar
This will allow RP XP banking to work properly.
The tinting lever also needs a plugin off the vault, though it's less important than the other two.
If you see "error 140001" initializing one or both of these plugins, try also installing this C++ runtime library from micro$oft:
http://www.microsoft.com/downloads/deta ... layLang=en
Marklos went through all this last weekend when I set him up to host the OAS2, so he's a good one to ask if I'm not around. My hotel has free wireless, so I'm checking in periodically, but 3 hours further out of sync with Oz currently.
The way to restablish DB connection is just to reload the module via NWNx4 - I wrote code that watches for these problems, and sends a command to NWNx4 to automate this process that's currently working on my hosted 003 copy and the OAS2 over on Marklos' machine, but it requires installing another NWNx4 plugin to function.
It's the first entry on this page: NWNx4/System 0.0.0.5
http://www.nwnx.org/index.php?id=65
You just need to install the plugin, no need to import the erf or make any scripting changes (provided you've updated haks via the www.alandfaraway.org Worldgate and recompiled scripts successfully).
While you're at it, you may want to also install the xp_chat plugin:
http://data.virusman.ru/nwn/nwnx4/xp_chat-0.3.3.rar
This will allow RP XP banking to work properly.
The tinting lever also needs a plugin off the vault, though it's less important than the other two.
If you see "error 140001" initializing one or both of these plugins, try also installing this C++ runtime library from micro$oft:
http://www.microsoft.com/downloads/deta ... layLang=en
Marklos went through all this last weekend when I set him up to host the OAS2, so he's a good one to ask if I'm not around. My hotel has free wireless, so I'm checking in periodically, but 3 hours further out of sync with Oz currently.
- AcadiusLost
- Chosen of Forumamus, God of Forums
- Posts: 5061
- Joined: Tue Oct 19, 2004 8:38 am
- Location: Montara, CA [GMT -8]
- Contact:
Another thought- I was presuming the situation you're having is:
1. Connecting to the central SQL Database (vault.alandfaraway.org, alfa_beta)
2. Module loads and starts off with working SQL transactions, but then subsequently fails at a later time.
If this is the scenario, the above fix is all you need. In any case, you'll want to try the above. However, if you're having this error already by the time the module is loaded, it could be something I've seen recently with 003- if the module takes a very long time to load (20+ min?), sometimes the central SQL DB times out before it finishes loading. If this is what's happening, your options seem to be either 1) increase the module load times, or 2) switch to a local-hosted MySQL DB schema, which is more resiliant to DB timeouts.
For example, when I tried to load the 2.1 gig 003 on my host rig, connected to the central database, it would time out between the "connected to vault.alandfaraway.org", and the initial selects from the DB 23 minutes later. My build rig, which loaded the same module in about 10 minutes, worked fine for the connection.
Hope this provides some insights- complications like these are why I prefer to walk hosts through the initial setup as I did with Marklos. By the time we start getting more hosts up, hopefully I'll have time to document it in a stepwise fashion.
1. Connecting to the central SQL Database (vault.alandfaraway.org, alfa_beta)
2. Module loads and starts off with working SQL transactions, but then subsequently fails at a later time.
If this is the scenario, the above fix is all you need. In any case, you'll want to try the above. However, if you're having this error already by the time the module is loaded, it could be something I've seen recently with 003- if the module takes a very long time to load (20+ min?), sometimes the central SQL DB times out before it finishes loading. If this is what's happening, your options seem to be either 1) increase the module load times, or 2) switch to a local-hosted MySQL DB schema, which is more resiliant to DB timeouts.
For example, when I tried to load the 2.1 gig 003 on my host rig, connected to the central database, it would time out between the "connected to vault.alandfaraway.org", and the initial selects from the DB 23 minutes later. My build rig, which loaded the same module in about 10 minutes, worked fine for the connection.
Hope this provides some insights- complications like these are why I prefer to walk hosts through the initial setup as I did with Marklos. By the time we start getting more hosts up, hopefully I'll have time to document it in a stepwise fashion.
- AcadiusLost
- Chosen of Forumamus, God of Forums
- Posts: 5061
- Joined: Tue Oct 19, 2004 8:38 am
- Location: Montara, CA [GMT -8]
- Contact:
So after it finishes loading, the xp_mysql.txt shows successful DB reads and writes, but it goes later to a "SQL Server Has Gone Away" state?
If so, this is the same occasional behavior I was seeing with the OAS2- I'd just check the log periodically and reset via the NWNx4 GUI if I saw it throwing the error- inevitably, the SQL server would be back available again by that time, so it always sorted it out.
Once you get the restart plugin set up though, it should sense these DB disconnects within 5 minutes, and will restart the server every few minutes until the DB comes back up- so it should be pretty worry-free.
If so, this is the same occasional behavior I was seeing with the OAS2- I'd just check the log periodically and reset via the NWNx4 GUI if I saw it throwing the error- inevitably, the SQL server would be back available again by that time, so it always sorted it out.
Once you get the restart plugin set up though, it should sense these DB disconnects within 5 minutes, and will restart the server every few minutes until the DB comes back up- so it should be pretty worry-free.
- ç i p h é r
- Retired
- Posts: 2904
- Joined: Fri Oct 21, 2005 4:12 pm
- Location: US Central (GMT - 6)
- AcadiusLost
- Chosen of Forumamus, God of Forums
- Posts: 5061
- Joined: Tue Oct 19, 2004 8:38 am
- Location: Montara, CA [GMT -8]
- Contact:
Hialmar has it set up via powweb I believe- the DNS is vault.alandfaraway.org - it's been pretty reliable and had excellent uptime, The disconnects have been quite infrequent. The only reason it's been an issue is the SQL plugin's lack of tolerance for disconnects, so one brief disconnect used to leave it offline until manually reset.