You’re working under the assumption that the AIM server itself is creating and keeping open a new connection to MySQL for each client connected, instead of the most logical and far easier to deal with: single connection to MySQL and all queries through that. The problem likely isn’t the AIM server at all, but the web server. Perhaps if he enjoys doing far more work, and you’ve already said he’s lazy so why also claim he’s built a system vastly more complex than it needs to be?
It shows how thorough your research is because the error message tells you everything you need to know. The fact he’s using mysql_connect means that every single page request opens up a new connection, rather than most logical mysql_pconnect used along side mod_php so that you have very few connections open. I’m not sure if he’s using PHP as FastCGI or not but if he is, he needs to go to mod_php, use mysql_pconnect.
It shouldn’t matter the default is 151, you should never come that close to begin with. Only crappy enterprise software that costs $100K and authenticates with the RDBMS should you worry about maximum connections. If that’s the issue, your bottle neck is elsewhere.
Edit: And I noticed you brought up, at least twice, the fact it’s a Core 2 Duo. First of all: who the hell cares? Second, do you really believe that is the issue? You must because you repeat it as though it’s the ultimate zinger. Back in the 90s and early 2000s far slower processors handled far more connections.
Additionally you don’t seem to think RAM has any impact at all for some reason, which I don’t quite understand. Further you try to claim it’s poor configuration, again, what is the point of bringing it up? It’s about design and configuration, but design most of all. In the 90s, I wrote in C++ (and other, crappier languages) that handled sometimes a few thousand connections at the same time (Unix), and while I don’t quite remember the specs on the various servers, I do remember that when we got some in with 2GB RAM being absolutely impressed with that, far more than the clock speed, because that’s what you think matters or at least imply it by repeatedly bringing up Core 2 Duo.
I think his issues are likely:
- RAM and using .NET
- Poor connection, he doesn’t even have a static IP
- Design issues
- Having the web server and AIM server on the same machine, presumably