It's hard to tell from a distance, so to speak. One thing I might check is whether you're connecting with a persistent connection or not (mysql_pconnect() if using the old MySQL extension in PHP). From what I've seen and read, if you don't get all the configuration settings just so, persistent connections can end up leaving "zombie" processes hanging around until there are no available connections left. The simplest fix in that situation is to just use mysql_connect() instead, possibly losing the (usually very small) performance gain you get with persistent connections.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation