Yes, MySQL has a setting for the maximum number of connections allowed.
What could also be the problem is the following:
When using a MyISAM table, and you have a thread running somewhere that inserts data into a table, but the thread hangs, all other threads can not read the table, since it is locked by the writing thread.
If this goes on long enough MySQL hangs itself (so to speak), and takes the whole server down with it. I had this on my server several times (solved it my giving the inserting PHP thread a time out, it was run via CLI, which by default doesn't have a time out).
With InnoDB this is not a problem since it has row-level locking (it does however have its own disadvantages).