Too many connection

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
milleusi
Forum Commoner
Posts: 30
Joined: Mon Jun 13, 2005 3:18 am

Too many connection

Post by milleusi »


Warning: mysql_connect() [function.mysql-connect]: #08004Too many connections in line...

what is the cause of this error....

site is not yet populated, and i'm using mysql_close($link)....

for connection i'm using

Code: Select all

$link = mysql_connect('localhost', 'mysite', '')
   or die('connect error  ' . mysql_error());

mysql_select_db('mydb') or die('db error');
pls,pls,pls....[/i][/b]
sheila
Forum Commoner
Posts: 98
Joined: Mon Sep 05, 2005 9:52 pm
Location: Texas

Post by sheila »

Are you on a shared server, sharing MySQL with other sites? Some other site could be causing the problem. Ask your host to look into it.
milleusi
Forum Commoner
Posts: 30
Joined: Mon Jun 13, 2005 3:18 am

Post by milleusi »

how to know how manny connection i have for mysql. i have a page on a shared server.

if not all mysql_connect are clossed how to know this??


unclossed connection can generate this error??
User avatar
tasteslikepurple
Forum Commoner
Posts: 46
Joined: Thu Jan 26, 2006 3:38 am
Location: Bath, UK

Post by tasteslikepurple »

php automatically closes the connection when it's finished so you don't need to worry about connections staying open forever. as sheila said, the problem probably is that there are lots of sites on the server all trying to use mysql at the same time.
Post Reply