Unless you're creating more than one connection per page (Not recommended; most database servers can serve the contents of several databases using the same connection), there will NEVER be more connections than you have Apache worker processes.
So look at how many apache worker processes / threads you have (Look at MaxClients and other related settings), and set it to a level where it will never exceed the number of max_user_connections.
Then it will never fail in this way even though new connections (to Apache) may have to wait for an available thread.
Mark