Re: [phplib] Oracle DB_SQL : Too many connections?? From: Dima Nemchenko (Dima.Nemchenko <email protected>)
Date: 06/14/01

"j.t.montgomery" wrote:

> Hi All,
>
> I have been subclassing DB_sql for convenience throughout an Application I
> am writing suddenly I notice that pretty quickly it arrives at the Max
> number of connections to Oracle, making it unusable in the real world.
>
> It appears to open another persistent connection for every query I make to
> the same database object :
> $c = new DB(); // What I have named the subclass
> $c->query( $sql );
> // process results here
> $c->query( $other_sql );
> // process 2nd set of results...
>
> In port Monitor :-
> Remote address Local_address Protocol Status
> dbserver.norcol.ac.uk:1526 localhost:1063 TCP ESTABLISHED
> dbserver.norcol.ac.uk:1526 localhost:1067 TCP ESTABLISHED
> dbserver.norcol.ac.uk:1526 localhost:1076 TCP ESTABLISHED
> dbserver.norcol.ac.uk:1526 localhost:1078 TCP ESTABLISHED
> dbserver.norcol.ac.uk:1526 localhost:1094 TCP ESTABLISHED
> dbserver.norcol.ac.uk:1526 localhost:1096 TCP ESTABLISHED
> dbserver.norcol.ac.uk:1526 localhost:1219 TCP ESTABLISHED
> dbserver.norcol.ac.uk:1526 localhost:1225 TCP ESTABLISHED
>
> I suspect this behaviour is wrong? If so, how to fix the situation to reuse
> the connection? Or, can I close the object's connection "manually"?
>
> Thanks for any assistance/suggestions.
>
> :-)
> John

Why not use $c->connect()?..

Oops... Just had a look in the manual--I was never taught that " there is no
need to call connect() manually, ever." What are the implications if you do??

--

:D_ima Dima Nemchenko <Dima.Nemchenko <email protected>>

"Open source code is like lobster--most people who haven't tried it don't like the way it looks. But those who try it, love it."

--------------------------------------------------------------------- To unsubscribe, e-mail: phplib-unsubscribe <email protected> For additional commands, e-mail: phplib-help <email protected>