Warning: mysql_connect() [function.mysql-connect]: Can't create a new thread (errno 11); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug in /home/user/public_html/file.php on line 400
Can't create a new thread (errno 11); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug
That's the available memory you're telling MySQL you have. In general, swapping is _not_ a good idea.
Bearing in mind that your OS itself and whatever else is running on the machine needs memory, you either need to:
1) increase the amount of physical memory available
2) refactor / rework some of your code (and SQL statements) so MySQL is less memory intensive. Some things you can look into here are persistent connections and your SQL statements (are you doing a 'SELECT *' where it's not needed? Are you paginating data? etc. etc.)
3) reduce these settings. iliya428's value are a little conservative, but a pretty good starting point. I'd always start a little lower and increase sparingly as opposed to the other way around. This depends what else is running on the system obviously.