We have been receiving some major problems with our DB server as of late. It keeps crashing because it reaches Max Connections. I know the simple answer is to up the Max Connections but I think we have a bigger problemt then that.
I have installed MyTop and I see ALOT of sleeping connections. Does anyone know the full definition of why I see sleeping queries? I think it is because we are using a persistant DB connection and the code doesn't properly finish the query (e.g. $qry->finish;).
To set up ou DB connection this is the code we use:
Any advice would be greatly appreciated.
Thanks,
Dan Sampson
I have installed MyTop and I see ALOT of sleeping connections. Does anyone know the full definition of why I see sleeping queries? I think it is because we are using a persistant DB connection and the code doesn't properly finish the query (e.g. $qry->finish;).
To set up ou DB connection this is the code we use:
my $db = DBI->connect("DBI:mysql:$dbname;host=$hostname",'','') || die "Couldn't connect: " . DBI->errstr;
return $db;
Any advice would be greatly appreciated.
Thanks,
Dan Sampson