How do I avoid the "too many connections" error message is shown?
There are two issues here:


Users are seeing site error messages that they shouldn't
The error message itself


For 1, go to admin/config/development/logging and set Error messages to display to None.  Don't worry, this won't affect messages like "incorrect login details" or "page not found, we did a search instead" ... things that the user really needs to know.

As for 2, here are a couple of things to try:


Turn off all your custom modules if you have any, re-enable them one by one to see if you can find the cause
Do the same with contributed modules
Read up on the error message, there are too many things that could be causing it that are non-drupal specific to be useful on this site.