| From: | "Joseph" <joseph(at)sitewarehouse(dot)net> | 
|---|---|
| To: | <pgsql-hackers(at)postgresql(dot)org>, <pgsql-interfaces(at)postgresql(dot)org>, <joseph(at)sitewarehouse(dot)net> | 
| Cc: | <pgsql-admin(at)postgresql(dot)org>, <pgsql-general(at)postgresql(dot)org> | 
| Subject: | Help me for "DBI->connect failed: Sorry, too many clients already." | 
| Date: | 2000-12-19 18:56:33 | 
| Message-ID: | 000801c069ed$68ef1b00$a33b8acc@sitedom | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-admin pgsql-general pgsql-hackers pgsql-interfaces | 
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)=(at)_;
  $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(at)hotmail(dot)com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Joseph | 2000-12-19 19:01:46 | help | 
| Previous Message | Mustafa Timur GÖKÇE | 2000-12-19 17:02:28 | Large Object | 
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Joseph | 2000-12-19 19:01:46 | help | 
| Previous Message | Steve Heaven | 2000-12-19 18:08:48 | Re: Schema | 
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Stephan Szabo | 2000-12-19 19:19:16 | Re: Three types of functions, ala function redux. | 
| Previous Message | mlw | 2000-12-19 18:41:10 | Three types of functions, ala function redux. | 
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Joseph | 2000-12-19 19:01:46 | help | 
| Previous Message | npdavis | 2000-12-19 18:45:35 | Re: Connection Pooling....an interesting question!! (was..Connection Pooling...(Repost)...please do help...) |