max_connect_errors has nothing to do with this message, read the MySQL manual.
Closing the connections is good, but does not help because the connections are closed by PHP when the script exits.
Using pconnect will not help either, because that just leaves connections open for a long time so they don't have to be re-opened all the time.
There are exactly two things that will help:
1- Use fewer database connections in your PHP scripts.
2- Increase the number of connections that your database server will accept.