Freiegeister
Morkin Member
'Blasphemy is a victimless crime' - Dawkins
Posts: 1,126
|
Post by Freiegeister on Aug 10, 2004 23:05:05 GMT
I had a recent issue with SQL Server where the connection pool was exhausted faster than the garbage collection could add redundant connections back to the pool. The cause was tracked to a single db calling function that wasn't explicitly closing the connection.
Could this be the case with M/MU?
|
|
|
Post by sparrowhawk on Aug 14, 2004 9:28:49 GMT
I don't think so. I'm pretty sure that I explicitely close all connections, but in any case as far as I understand it, either PHP or MySQL (not sure which bit handles it) does a database disconnection at the end of all scripts.
Anyone know wheter this is correct?
|
|
Freiegeister
Morkin Member
'Blasphemy is a victimless crime' - Dawkins
Posts: 1,126
|
Post by Freiegeister on Sept 5, 2004 20:08:05 GMT
I was doing some VB.Net/MYSQL programming over the weekend and hit the Too Many Connections error. The problem? One of my helper classes was not explicitly closing the connection.
I wouldn't think it would be one of the core game modules, but possibly one of the other sections like "Member" or "Login" may be doing this in some situations.
|
|
|
Post by sparrowhawk on Sept 5, 2004 21:04:12 GMT
OK, I'll go through the scripts again to see whether I've forgotten to do an explicit close anywhere.
Thanks.
|
|
|
Post by sparrowhawk on Sept 6, 2004 13:22:44 GMT
Getting it yet again today . However, as I was the only player on at the time (I think), I'm beginning to feel that it's not the scripts, although I'm not ruling that out as yet. It also started happening after the UKlinux crash, but agian that may be unrelated. Needle. Haystack. Proverbial.
|
|
|
Post by sparrowhawk on Sept 6, 2004 13:40:43 GMT
OK, I think that I may have identified the problem. I have uploaded some updated scripts and hopefully that should solve the problems.
The site is unlikely to be active again for some time, until the connections are released again by the server. (Hours?)
|
|
|
Post by sparrowhawk on Sept 6, 2004 14:16:19 GMT
OK, it's back sooner than expected. Hope the fixes work!
|
|
|
Post by sparrowhawk on Sept 6, 2004 15:31:06 GMT
In fact, it's speeding along like a... a .... very fast thing ;D
BTW, David was right, I had some unclosed connections.
|
|
|
Post by sparrowhawk on Sept 7, 2004 16:52:28 GMT
And now it's hanging again My scripts or the server? I just don't know. The only way to find out will be to copy everything onto the icemark site and see if the problem persists. Chris, let me know if/when you have time to run the MySQL upgrade script. I appreciate that this is low priority at the moment Bugger. Here's the latest: Nothing to do with connections this time. Sigh...
|
|
Freiegeister
Morkin Member
'Blasphemy is a victimless crime' - Dawkins
Posts: 1,126
|
Post by Freiegeister on Sept 7, 2004 20:51:11 GMT
Happy to share what I learn from my own mistakes. With the new problem, I always though Apache was good at recreating HTTP child processes as they got stomped on, unlike IIS that would probably need a restart if this happened. This may be out of your control, as the HTTP connection pool would usually be shared with other web sites on the server. Let UKLinux know if it keeps happening as they should be able to check the logs to see which site is breaking connections.
|
|
merlin
Public Area Guest
Posts: 19
|
Post by merlin on Sept 8, 2004 9:50:38 GMT
And now it's hanging again My scripts or the server? I just don't know. The only way to find out will be to copy everything onto the icemark site and see if the problem persists. Chris, let me know if/when you have time to run the MySQL upgrade script. I appreciate that this is low priority at the moment Bugger. Here's the latest: Nothing to do with connections this time. Sigh... Email everything to me and I'll do it tonight, got no access to my home machine because of the builders! Alternatively email it to me at work and I can do it now.
|
|
|
Post by sparrowhawk on Sept 8, 2004 11:18:02 GMT
Database has been sent. Please let me know when it's uploaded.
I'll upload the scripts in the meantime.
To the others:
PLEASE DO NOT LOGIN TO THE ICEMARK M/MU UNTIL I LET YOU KNOW THAT IT'S ALL OK!!!
Thanks!
|
|
|
Post by sparrowhawk on Sept 14, 2004 21:01:11 GMT
So far so good from my end. Is it OK for everyone else?
|
|
Matija
Morkin Member
The Turtle Moves!
Posts: 1,696
|
Post by Matija on Sept 15, 2004 7:58:53 GMT
Works great.
|
|
Ringthane
Public Area Guest
Ardet nec Consumitur
Posts: 5,446
|
Post by Ringthane on Sept 15, 2004 11:12:06 GMT
Oh yes ;D More games
|
|