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

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

From: Jie Liang <jliang(at)jliang(dot)ipinc(dot)com>
To: Joseph <joseph(at)sitewarehouse(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org, pgsql-interfaces(at)postgresql(dot)org, pgsql-admin(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org
Subject: Re: Help me for "DBI->connect failed: Sorry, too many clients already."
Date: 2000-12-19 22:22:34
Message-ID: Pine.BSF.4.21.0012191414530.41541-100000@jliang.ipinc.com (view raw or flat)
Thread:
Lists: pgsql-adminpgsql-generalpgsql-hackerspgsql-interfaces
Hi,there,

I hope it helps;

1. postgres by default allows 16 sessiones(if I don't remember wrong)
   at same time. You can change the setting according to the doccument.
   open too many sessiones at same time will more or less affect the
   performance.
2. I believe that using Pg module will be easier than DBI.


Jie LIANG

Internet Products Inc.

10350 Science Center Drive
Suite 100, San Diego, CA 92121
Office:(858)320-4873

jliang(at)ipinc(dot)com
www.ipinc.com

On Tue, 19 Dec 2000, Joseph wrote:

> 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
> 


In response to

Responses

pgsql-hackers by date

Next:From: Mark HollomonDate: 2000-12-19 22:41:59
Subject: Re: [HACKERS] Manual changes for ALTER TABLE OWNER
Previous:From: Oleg BartunovDate: 2000-12-19 20:26:25
Subject: Re: Who is a maintainer of GiST code ?

pgsql-admin by date

Next:From: Rainer MagerDate: 2000-12-19 22:46:52
Subject: RE: SQL statement limit
Previous:From: Marc SCHAEFERDate: 2000-12-19 20:02:47
Subject: Re: Help me for "DBI->connect failed: Sorry, too many clients already."

pgsql-interfaces by date

Next:From: Jimi ThompsonDate: 2000-12-20 00:47:46
Subject: Re:
Previous:From: Jason EarlDate: 2000-12-19 20:11:06
Subject: Re: Python and PSQL

pgsql-general by date

Next:From: Peter EisentrautDate: 2000-12-19 23:12:11
Subject: Re: Generating HISTORY file
Previous:From: Edmar WiggersDate: 2000-12-19 22:11:45
Subject: RE: Trigger with superuser privileges

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