There are two ways out:
1. You may want to change mysql_pconnect() to mysql_connect(), because first one won't close connection when script is ended. Documentation says:
Quote:
the connection to the SQL server will not be closed when the execution of the script ends. Instead, the link will remain open for future use (mysql_close() will not close links established by mysql_pconnect()).
|
2. You may increase your max_connections variable in your my.cnf.
Up to you to decide which way is the best for your case.
Cheers.