Jump to content
MakeWebGames

Recommended Posts

Posted

Can anyone please tell me what are the possible causes of this error? And how is it possible to prevent such errors.

 

Warning:  mysql_connect() [function.mysql-connect]:
Too many connections in /home/hytrtrogenic/public_html/globalsfiles/class/class_db_mysql.php
on line 46

FATAL ERROR: Could not connect to database on localhost (Too many
connections)
Guest Drizzle
Posted

it means too many things are connecting to it. idk how to fix it cuz ive never gotten that error.

Posted

1) Make sure you don't use pconnect to not keep persistent connections (which tend to produce this kind of errors).

2) Increase the number of possible connection on your MySQL server (however more connections means lot more memory usage).

Posted

Complementing what a_bertrand said, i am not a fan on increasing the connections number for the same reasons he stated, so making it another point...

3) use mysql_close() more often, that if you even use it :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...