Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Problem PHP3 + Oracle 8i

Re: Problem PHP3 + Oracle 8i

From: John Darrah <jdarrah_at_veripost.net>
Date: Tue, 11 Dec 2001 17:09:40 +0000 (UTC)
Message-ID: <0bbdef9c296d527369e320aeb04e7631.36240@mygate.mailgate.org>


I have to disagree with the statement that OCILogin should be used instead of OCIPLogin. You should be using OCIPLogin and not OCILogin. OCIPlogin creates a persistant login which means the session can be used to satisfy several DB requests. OCILogin will create a session process the request and then destroy the session. The overhead of creating and ending the session will bog down performance if your site recieves more than just a few hits. OCIPlogin will grab an existing connection and use it rather than go through the trouble of creating a new session for just one call. To keep your servers from growing to the point where you get the max processes error, set the following parameters in your httpd.conf file:

# It does this by periodically checking how many servers are waiting
# for a request.  If there are fewer than MinSpareServers, it creates
# a new spare.  If there are more than MaxSpareServers, some of the
# spares die off.  The default values are probably OK for most sites.
#

MinSpareServers 10
MaxSpareServers 10
#
# Number of servers to start initially --- should be a reasonable ballpark
# figure.
#

StartServers 5
#
# Limit on total number of servers running, i.e., limit on the number
# of clients who can simultaneously connect --- if this limit is ever
# reached, clients will be LOCKED OUT, so it should NOT BE SET TOO LOW.
# It is intended mainly as a brake to keep a runaway server from taking
# the system with it as it spirals down...
#

MaxClients 500

The MaxClients parameter should not exceed the processes setting in your init.ora file. The trick here is to have enough processes so people aren't waiting but not having so many that you are wasting resources. I would also say that unless you have some experience with MTS, you don't immediately throw it into your production mix. MTS can help environments with a massive numbers of concurrent users but if your environment doesn't need it, all you've done is add another layer of complexity.

Hope this Helps

"Mladen Gogala" <mgogala_at_earthlink.net> wrote in message news:pan.2001.12.10.23.32.18.216107.1219_at_earthlink.net...

> On Mon, 10 Dec 2001 10:43:02 -0500, Martin wrote:
>
> > Hello
> >
> > I'm working on some web services, I use two sun solaris OS: SUN OS 5.7,
> > PHP3 and an oracle database 8.1.6.
> >
> > I'don't understand:
> >
> > I often have this error:
> > OCISessionBegin: ORA-00020: maximum number of processes (250) exceeded
> >
> > I check the table v$process and i have 247 process, so I set the process
> > to 600 and the open_cursor to 1000 in order to see if it still grows...
> >
> > To day, I have 580 process. I think, I will see the ORA-00020 error
> > again. I only have 20 sessions..
> > So I think that the process are not released, but why? Are there anything
> > to free this process
> >
> > If someone have any idea?
> > Do you think the client configuration( the two sun) is wrong or the
> > database as some bad paramaters?
> >
> > Martin
> >
>
> Are you, by any chance, using OCIPLogon? That will open a new dedicated
> server connection whenever you issue that command. Anyway, you cannot
> preserve connection between processes which means that you have to
> re-issue OCILogon at every new page (you can make username, password and
> dbname session persistent). Using OCIPlogon instead of OCILogon will
> quickly accumulate processes. Make sure that your httpd processes are
> connecting through the MTS.
>
>
> --
> Mladen Gogala

-- 
Posted from d225s244.hotbank.com [63.83.225.244] 
via Mailgate.ORG Server - http://www.Mailgate.ORG
Received on Tue Dec 11 2001 - 11:09:40 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US