PDA

View Full Version : Warning: too many connections


mat
10-02-2002, 12:08 AM
The setup is this:

In my public_html dir. i have two php pages and they are gallery.php and detail.php. In the directry above this i have another small php script called dbConnet.php.

Both the gallery and detail pages have in them the following:

include "../dbConnect.php";

After that line they start to query and do their thing. The dbConnect.php file as you'd expect has this:

<?php

mysql_connect('127.0.0.1','username,'pass');

mysql_select_db('my_database');

?>



So the scenrio is that the user goes to a gallery pics a thumbnail of a product and up comes a pop up with a bigger versiona dn some detail (detail.php) I have been using it on my local machine for a while and got it all to the point where o though everything was fine but now a couple days after putting up on a host i get a friend show me this from my site

http://www.theory1.orcon.net.nz/warning.gif


:( ? It only does it sometimes but it's there and it's not good.

I'm not sure what to do?


mat,

Dylan Leblanc
10-09-2002, 11:44 AM
This should help:
http://www.mysql.com/doc/en/Too_many_connections.html

The problem is that there are more the the specified amount of users trying to access the database. Just increase the number.

mat
10-09-2002, 10:50 PM
As it turns out, After contacting the host apparently someone was using a script that takes up all connections :mad: anyway they have disabled it and everything seems to be o.k.


Cheers, Mat