ADO leaving "Sleeping connections"

ADO leaving "Sleeping connections"

am 11.01.2007 23:09:53 von Todd Cary

When I run my application under a load test, ~1,800 connections
are left in a Sleeping status (using the Stored Procedure,
sp_who, reveals this). This causes the application to hang.
After leaving the SQL Server rest for several minutes, the
connections are restored and the application can run. Has anyone
ever experienced this problem?

This is my test script:

$dbh = db_open($dbserver, $user, $password, $database);
if ($dbh) {
echo "Connected to " . $dbserver . "
";
echo "Opened database " . $database . "
";
$row = db_find_case_all($dbh, "***");
if ($row) {
while(!$row->EOF) {
$ca_casename = $row->Fields["CA_NAME"]->Value;
$ca_casecode = $row->Fields["CA_CODE"]->Value;
echo $ca_casecode . " " . $ca_casename . "
";
$row->movenext();
}
} else {
echo "There are no cases
";
}
} else {
echo "Cannot connect to " . $dbserver;
}
if ($row){
$row->Close();
$row = null;
}
if ($dbh) {
$dbh->Close();
$dbh = null;
}

if (!$dbh)
echo "Connection closed
";
else
echo "Connection still open
";

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php