Core 2 Duo server running AIM server software + 151+ users + default MySQL settings = disaster

Tried to log on to AIM, but it complained about my password being incorrect despite me double checking it to be correct. Then I went to log on to the site to make sure I could log in there, but I was greeted with this by the time I got the site to load:

From doing some research, this is due to the configuration determining the maximum connections that can be made to a MySQL server. I assume Wildman left his to the default of 151, and since 100 users maximum usually connect to his server, I guess he got more traffic and the user count going over 151 resulted in MySQL to error out and render the service useless. Same thing happens with Y!2, so I guess they share the same DB. Kind of lazy tbh.

Out of the many things Wildman doesn’t care out, his MySQL setup is one of those things. :stuck_out_tongue:

he must have this “server” pc trown in some basement and left running there

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:

  1. RAM and using .NET
  2. Poor connection, he doesn’t even have a static IP
  3. Design issues
  4. Having the web server and AIM server on the same machine, presumably
2 Likes

I also have Core 2 Duo machine, but I didn’t set up anything yet there for web hosting since… it’s impossible without port-forwarding, which I can’t, because instead of going to router settings it goes to the antenna settings page.

The Core 2 Duo thing was just a joke, and also for detail reasons.

Lay off, I’m not some PHP geek. I want to be, but I’m not there yet. :unamused: The least you could’ve done is tell me what you said afterwards.

I assumed he made a new connection for each connected user, not because of laziness, but it was an idea that just popped from my head.

Since Wildman is hosting this stuff off some old computer collecting dust somewhere, that’s a slight concern for me. However, do maximum connection errors from MySQL occur when there’s little RAM from the host? Genuinely curious.

Wat.

BTW off-topic but you finally had the guts to register on MessengerGeek just now lol. :stuck_out_tongue:

Lay off, I’m not some PHP geek. I want to be, but I’m not there yet. :unamused: The least you could’ve done is tell me what you said afterwards.

In that case, don’t even bother with mysql_* functions, they aren’t even available on PHP 7, instead use MySQLi or PDO or whatever. Additionally a lot of people do say not to use permanent connections and to this day, having used PHP since 2000 (PHP 3) I’ve yet to understand why they give such stupid advice.

However, do maximum connection errors from MySQL occur when there’s little RAM from the host? Genuinely curious.

Not RAM, but I think on Windows there’s a hard stop at 1024 no matter what, but that may no longer be accurate but it was true for many years. In Unix/Linux you can run into it too if you run out of hard disk space.

BTW off-topic but you finally had the guts to register on MessengerGeek just now lol.

What?

The real quesion is: in which OS is it hosted? Does it require sudo to run everything? (i hope it doesn’t)

Windows NT of some sort, possibly Server 2008, but I am not sure.