If you got too many connection error consider to apply this modification.
This is a database issue and has to do with the following mysql variables:

show the current variable on running process

Code:
mysql> SHOW VARIABLES;
You can also see some statistical and status indicators for a running server by issuing this statement:

Code:
mysql> SHOW STATUS;
interactive_timeout
wait_timeout

By default these variables are set to 28800 and they represent the time for which
the server waits on "persistent" connection.
If you have a busy site that number is way too big; so try to decrease
those variables and you should be fine:
Code:
mysql> set global interactive_timeout = 120;
mysql> set global wait_timeout = 120;
This makes the timeout on connections 2 minutes after which mysql disconects the user
and so freeing usable space for new connections.
You can also add them in my.cnf so that the server gets them when started:

Code:
set-variable = interactive_timeout=120
set-variable = wait_timeout=120

Refer: http://dev.mysql.com/doc/refman/5.0/...variables.html