I just heard from Sergei Golubchik, a Senior Software Developer for MySQL AB, that what I found was, in fact, a bug in MySQL that could cause the count of connections to get out of whack.
Since the authors of MySQL agree there's a probem, is there any chance we could get the MySQL daemon restarted to make the symptoms go away for a few weeks?
Take that, someone!
Rob, that's amazing. Thank you so much.
Rob, wow. Go you!
With the continuous digging and the not despairing and the going-to-the-sources and, most of all, finding the origin of the problem!
Yeah Rob & Sergei!
If we can get the daemon restarted, and the problem goes away, do we still need to move?
Nice call, Rob.
If we can get the daemon restarted, and the problem goes away, do we still need to move?
If the daemon is restarted the error messages will go away, probably for a couple of months. If the current version of mysql is replaced with one that has these new patches applied, the error messages will go away permanently.
Whether or not we are using mysql too heavily is a separate issue.
It looks like we've been sharing
one
connection for forever. I'm sure the traffic has lightened and we may have lost posters due to lack of patience, but I can't see, under non-race conditions, how we'd honestly use more than 100, seeing as we're getting clumsily by.
I hate writing code that hits a bug in another system -- where the hell do you start to work around that?
At some point, the code should be rewritten so that mysql connections are preallocated, and kept open between page views.
This will signifigantly improve performance, since opening and closing msyql connections is a relatively expensive operation, especially on the server side.