Mysql Warning: Too Many Connections



Mysql Warning: Too Many Connections
 (380) Click. Work. Collect
Mysql Warning: Too Many Connections
Post Description:
Post Tags: mysql, warning, too, many, connections
This Post Has Been Viewed 117 Times Since Fri Jul 04, 2008 9:18 am Posted By justin with 2 replies
Mysql Warning: Too Many Connections
for some reason im getting this error and i dont know what to do

i just moved my site to a dedicated server i thot it was going to be better but if this keeps up like this my wallpaper website will keep crashing

help, how can i stop this error from coming back again

UPDATE


ok i found the answer to this. i have red hat fedora core server so i logged in as root and send these commands:

Edit my.cnf file with your favorite editor, im using nano you can use vi if you prefer
nano /etc/my.cnf


now add this line under [mysqld] section
set-variable=max_connections=250


save the changes and then restart mysqld server:
/etc/init.d/mysqld restart


Done


Leave Your Comments     [ dejar commentarios ]
  * Name     [nombre]

  * eMail (will not be published)     [coreo electronico]

* Enter Your Reply or Comments:    [commentarios]


Add Picture To Comments         [incluir foto]
YES NO             upload
Receive Replies on my Comments (An email will be sent to you when someone replies to your comments)

     

Comments and replies About Mysql Warning: Too Many Connections




:: 1 :: #60315 - Reply By hostman On Fri Jul 04, 2008 9:18 am
If you get a Too many connections error when you try to connect to the mysqld server, this means that all available connections are in use by other clients.

The number of connections allowed is controlled by the max_connections system variable. Its default value is 100. If you need to support more connections, you should set a larger value for this variable.

:: 2 :: #60316 - Reply By hostman On Fri Jul 04, 2008 9:44 am
you can also change the php.ini settings to:

A note por PHP developers. You can find this error if your scripts open persistent connections, wich aren't closed even if the script terminates. Use mysql_connect() instead of mysql_pconnect() unless you have a good reason. In particular, check this setting in third-party scripts (such as osCommerce).

Server administrators can disable persistent connections for PHP scripts in php.ini file:

[MySQL]
; Allow or prevent persistent links.
mysql.allow_persistent=Off

Scripts won't fail, they'll just use non-persistent connections silently.


http://dev.mysql.com/doc/refman/5.0/en/too-many-connections.html