Skip site navigation (1) Skip section navigation (2)

help

From: "Joseph" <joseph(at)sitewarehouse(dot)net>
To: <pgsql-general(at)postgresql(dot)org>, <pgsql-admin(at)postgresql(dot)org>, <pgsql-interfaces(at)postgresql(dot)org>
Subject: help
Date: 2000-12-19 19:01:46
Message-ID: 006101c069ee$227ffd00$a33b8acc@sitedom (view raw or flat)
Thread:
Lists: pgsql-adminpgsql-generalpgsql-interfaces
Help me for "DBI->connect failed: Sorry, too many clients already."
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

pgsql-admin by date

Next:From: Marc SCHAEFERDate: 2000-12-19 20:02:47
Subject: Re: Help me for "DBI->connect failed: Sorry, too many clients already."
Previous:From: JosephDate: 2000-12-19 18:56:33
Subject: Help me for "DBI->connect failed: Sorry, too many clients already."

pgsql-interfaces by date

Next:From: kadimalDate: 2000-12-19 19:55:49
Subject: Python and PSQL
Previous:From: JosephDate: 2000-12-19 18:56:33
Subject: Help me for "DBI->connect failed: Sorry, too many clients already."

pgsql-general by date

Next:From: Martin A. MarquesDate: 2000-12-19 19:17:31
Subject: Re: grant a db
Previous:From: JosephDate: 2000-12-19 18:56:33
Subject: Help me for "DBI->connect failed: Sorry, too many clients already."

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group