I launched a website in April (PHP with MySqL backend). With the exception of a couple minor hiccups, the site's been running very smoothly. The site provides small business ideas and related startup information, including small business type books from amazon.com.
This weekend amazon.com sent me an email saying that their Alexa service would crawl my site this week checking for broken links and the sort. The site has gone up and down all day (the up part is my rebooting the virtual server) with the following error:
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
The line number corresponding to this error is:
$db_msb = mysql_connect($host, $user, $pwd) or trigger_error(mysql_error(),E_USER_ERROR);
This line is in an include file I call from most any page on the site (since most any page has some database component to it). A typical call would look something like (conn.php contains the db variables and connect string stated above):
include_once($_SERVER['DOCUMENT_ROOT'] . '/inc/priv/conn.php') ;
$sql = "SELECT ID, BIZ_TITLE from listing WHERE STATUS = 1" ;
$rs = mysql_query($sql, $db_msb) or die(mysql_error()) ;
$row_rs = mysql_fetch_assoc($rs);
As I said, I've had no problems up to this point so I have to believe it's somehow related to amazon crawling the site. Our traffic has been pretty low since we just launched the site but we've been crawled by other bots without any noticeable issues.
I'm on a virtual dedicated server with GoDaddy running PHP 4.3.1.1 and MySQL 3.23.58. One thought, I don't explicitly close the mysql connection in any script. I think PHP closes connections when the script finishes but I could be mistaken.
Thanks for any help you can provide.