I have recently change all the connections on my site from pconnect to a simple connect under recommendation in the hope of avoiding max_user_connections errors.

However, I still get these from time to time and they completely lock out my site until the host flushes the database.

I've added a mysql_close to all the php files, I think, but even if I've missed a few, according to the documentation all resources are freed at the end of a script, and therefore it shouldn't be a problem.

The other curious thing about the failure is that I have several logins to the database and they all failed with max_user_connections at the same time. As I understand it, this is an error that should be specific to one user and I would have anticipated that it would not have affected all users at once.

Could it be that some general database error had locked out all the accounts at once or am I misunderstanding this error and once the limit of 20 (my current setting) is reach by one account then all the accounts are affected?

Any thoughts or advice would be greatly appreciated.