Help me for "DBI->connect failed: Sorry, too many clients already."

Поиск
Список
Период
Сортировка
От Joseph
Тема Help me for "DBI->connect failed: Sorry, too many clients already."
Дата
Msg-id 000801c069ed$68ef1b00$a33b8acc@sitedom
обсуждение исходный текст
Ответы Re: [ADMIN] Help me for "DBI->connect failed: Sorry, too many clients already."  (Jie Liang <jliang@jliang.ipinc.com>)
Список pgsql-hackers
my cgi program is test.cgi:
#######################
require "./connectdb.pl";
&connectdatabase();
$query="select count(*) from messages";
$sth=$dbh->prepare($query);
$sth->execute();
$count=$sth->fetchrow_array();
print "Content-type: text/html\n\n";
print <<"TAG";
<html>
<body>
<h2> The count is $count. </h2>
</body>
</html>
TAG
exit 0;
#############
my connectdb.pl :
sub connectdatabase {
#  my ($dbusername,$dbpassword)=@_;
  $dbusername="postgres";
  $dbpassword="lokicom";
  $dbname="mboardsony";
  use DBI;
  $dbh=DBI->connect("dbi:Pg:dbname=$dbname",$dbusername,$dbpassword) or die "can
not connect to $dbname\n";
}
1;
#######################
my os is Redhat 6.2,and perl 5.005,and  web server is Apache.
The problem is:when I run test.cgi,it can work properly.But when I press F5
to refresh the web page for sever minutes,the Apache will have error message:
"DBI->connect failed: Sorry, too many clients already."
  Who can help me?
  Thank you ahead.
 
  My email: joel_xue@hotmail.com

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Christopher Masto
Дата:
Сообщение: Re: Who is a maintainer of GiST code ?
Следующее
От: Christopher Masto
Дата:
Сообщение: Re: performance modality in 7.1 for large text attributes?