I recently ran into the too many connections problem. The site I was working on was administrated with a Delphi application - or actually, two apps. At worst, there were 30 ppl using the apps, which effectively grabbed 60 connections out of the default 100, which was when PHP started shouting MySQL-error: too many connections.
Normally this wouldn't happen, unless you use persistent connections. Make sure you close all connections to the database when your script is done with it.
Also if you're really worried, you could ask your server admin to increase the max_connections-variable in mySQL.
-L-