On Tue, Jul 23, 2002 at 11:39:20AM -0700, Eric Thelin wrote:
> That is what I figured.  The problem is that oracle doesn't even seem to
> have per-process limits.

    the oci-driver will only open one server-connection per
    TNS-name/process.

    so if you use 

    $a = ociplogon("scott", "tiger", "prod");

    and later (different script)

    $a = ociplogon("system", "manager", "prod");

    you will still only see one server connection (one "shadow")
    but you will have two sessions which share the one
    server-connection.

    so if you have more that one oracle-user that's used in your
    scriots you have to do:

    oracle-connections = MaxChilds
    oracle-session = MaxChilds * distinct oracle-logins

    now, if you limit the persistent connections per apache-child
    some logins would be fast whereby others would be slow, i
    really dislike this kind of unpredictable behaviour.

    if you have the need to connect more than one oracle-user i
    would either:

    - have different apaches running (one per oracle-user)
    - only use ociplogon for one of the users (starting a new
      session over an already established link is still fast)
    - not use oracle (just kidding;-)

    or, do you have any better ideas?

    re,
    tc

> 
> Eric
> 
> On Tue, 23 Jul 2002, Thies C. Arntzen wrote:
> 
> > On Tue, Jul 23, 2002 at 11:00:43AM -0700, Eric Thelin wrote:
> > > Is there a way to limit the total number of persistent connection to an
> > > oracle database?  I know this functionality exists for MySQL through a
> > > setting in the php.ini but I haven't found it for oracle.  I am in an
> > > environment where we have about 10 users that connect to oracle from
> > > each of 10 webservers that each have about 20 apache processes and I
> > > would like to use persistent connections but the resulting 2000
> > > connections would overwhelm oracle.  I am looking at reducing the number
> > > of users but that will be a large undertaking to go through the entire
> > > codebase.  Any ideas?
> >
> >     even the mysql-limits are _per_ apache-process. so if you
> >     want to limit the simutainious connections to any php
> >     supported database is to set MaxClients (in httpd.conf) or
> >     disable persistent connections completely.
> >
> >     re,
> >     tc
> >

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to