Max Connections Allowed Error

Hey Guys,

Can anyone please help me understand why I am getting this error when there is about 20 people on the site at one time.

The only thing I can think is that I have the db connection intialized in a include file (includes/header.php) and the db connection closed in an include file (includes/footer.php)

Should this still work, I dont see how I can be going over the max connections?

Not within PHP, and my MySQL server administration skills are minimal.

Nope, like i Said im opening it once in the header file

doing any kind of queries in the page that has the header file included on

closing the connection on the included footer page.

Do you have any ideas what could be causing this error to appear (and basically kill my entire site)

PHP closes any connections it made at script conclusion anyway, so this isn’t likely the issue unless you are opening a new connection per query and not closing them until your done with all of them.

Connections to the Database. Just wanted to make sure that even though the open and close connection statements are being “included” on a page, that they both should still function.

Connections to the db or connections to the server? In either event, not necessarily a PHP problem - you might get better information from the server management forum.

you have to configure your mysql settings to allow more connections. it’s a good result you’re getting alot of traffic :slight_smile:

But thats the issue, I track how many people are on the site at any given time and the highest record was 66 people at one time.

The max_connections I believe is set to 200 (on a shared server), so how could these 66 people be going over 200 connections?