Re: are Oracle persistent connections working?
| From: | Thies C. Arntzen | Date: | Fri, 13 Aug 1999 11:46:12 +0000 |
| Subject: | Re: are Oracle persistent connections working? | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-9798@lists.php.net to get a copy of this message | ||
sorry, i'm not in the office right now.
but - yes persistent connections are working and it is intended that
ociplogon returns different connections id every time you call it
(internally the same session will be used) - different topic, if you need
transaction-isolation you'll need to use ocinlogon (see the online-docs)
regards,
tc
On Wed, 11 Aug 1999, Phil Glatz wrote:
> Hi Thies - I posted this to the PHP list, but am hoping you might have some
> thoughts in case you missed it.
>
> A few questions about Oracle persistent connections, I don't see answers in
> the docs.
>
> I'm running Oracle 8.0.5 on SPARC/Solaris 2.7, connecting to Apache 1.3.7
> and PHP 3.0.11.
>
> I am calling OCIpLogon() twice on the same page, passing the same
> user/password/dbname parameters each time.
>
> When I check the return value, I get 2 the first time, and 5 the second.
>
> Shouldn't these identifiers be the same for persistent connections? I'm
> wondering if a persistent connection is truly being established.
>
>
> I do not explicity close the connection at the termination of serving the
> page. My experience with persistent connections and PHP up to this
> pointhas been with mySQL, whose documentation states that a database close
> request will be ignored if a persistent connection is used; the connection
> will be closed at the time the Apache child process ends its life.
that's more or less true for the oci-driver as well (thing are a bit more
complex though.)
>
> With the Oracle connection, it appears that the connections are not being
> closed. If I monitor the list of Oracle processes, they are being created,
> but never seem to die. After a while, I have hundreds of connections, all
> idling, and driving the CPU load up. It is as if a new connection is being
> requested for each Apache page request, but the old ones linger on. If
> persistence was working properly, it seems the maximum number of Oracle
> connections to the web server would never exceed the server limit on child
> connections.
that would be a bug - you should see one oracle-server process per apache
process, everything else would be wrong - please let me know!
tc
>
> So... am I doing something wrong? Are others using persistent connections
> successfully?
>
>
Thies C. Arntzen "One Big-Mac, Small Fries and a Coke!"
Digital Collections Phone +49 40 235350 Fax +49 40 23535180
Hammerbrookstr. 93 20097 Hamburg / Germany