Re: [PHP-DB] Limiting # of connections to remote Oracle

2001-05-24 Thread Remigiusz Sokolowski

Stig Sćther Bakken wrote:
> 
> ["Larry Osborn" <[EMAIL PROTECTED]>]
> > Greetings all,
> > We are having serious issues with PHP4.0.5 using OCI8 and Apache 1.3.17.
> >
> > We have 4 webservers that handle our various needs for oracle. Each server
> > has its MaxSpareServers in the httpd.conf set to 100. So that turns out to
> > be 400 connections to the Oracle database.  We are not using persistent
> > connections, because that makes the problem worse.  Does anyone know of a
> > way to limit the number of database connections without having to turn away
> > users by limiting the number of apache processes?
> >
> > We are using php+apache+oci8 to subscribe and unsubscribe people to our
> > mailing list.  We have simple select and update queries using non-persistent
> > connections.  Im not too sure what other information I would need to
> > provide, Im just a webdeveloper, not a sysadmin, so please bear that in mind
> > :)
> >
> > Thanks for any help you can give me.
> 
> Hi,
> 
> Oracle is able to handle hundreds and even thousands of simultaneous
> connections if you configure it right.  Try setting up (or have your
> DBA set up) the Oracle server in multithreaded mode if it isn't
> already, and use the dispatcher and the listener.  The dispatcher
> implements connection pooling for you, sharing a small number of
> Oracle server processes between a lot of connections.  This is an
> ideal setup for web applications, it also relieves the web application
> from having to think about connection pooling (although I think plogon
> will be slightly faster, we never tested without it).
> 
> I recently did a test with this setup, and it gave us 200+ tps with
> 500 "users".  Apache and the Oracle server were running on the same
> machine, with 2x733 P3s and 2GB RAM.
> 
> There's a lot of knobs in the connection setup you can tune to make it
> work for you: the number of simultaneous connections per dispatcher
> process (we used 250), the number of dispatcher processes (we used 8)
> and the number of shared Oracle server processes (I _think_ we used
> 8).  Our Apache config had MaxSpareServers set to 450, and during the
> test it pretty much kept all Apache processes busy, just to give you
> an idea of the volume this setup can handle.

You could also use additional software like sqlRelay (www.firstworks.com
I believe)
This works a little like connection pooling mechanism. 
Btw, if  You use it and find it good solution, could send word or two
about Your impression?
Remigiusz
-- 

---/\--
Remigiusz Sokolowski  e-mail: [EMAIL PROTECTED]/  \  
-/\-

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Limiting # of connections to remote Oracle

2001-05-24 Thread Stig Sæther Bakken

["Larry Osborn" <[EMAIL PROTECTED]>]
> Greetings all,
> We are having serious issues with PHP4.0.5 using OCI8 and Apache 1.3.17.
> 
> We have 4 webservers that handle our various needs for oracle. Each server
> has its MaxSpareServers in the httpd.conf set to 100. So that turns out to
> be 400 connections to the Oracle database.  We are not using persistent
> connections, because that makes the problem worse.  Does anyone know of a
> way to limit the number of database connections without having to turn away
> users by limiting the number of apache processes?
> 
> We are using php+apache+oci8 to subscribe and unsubscribe people to our
> mailing list.  We have simple select and update queries using non-persistent
> connections.  Im not too sure what other information I would need to
> provide, Im just a webdeveloper, not a sysadmin, so please bear that in mind
> :)
> 
> Thanks for any help you can give me.

Hi,

Oracle is able to handle hundreds and even thousands of simultaneous
connections if you configure it right.  Try setting up (or have your
DBA set up) the Oracle server in multithreaded mode if it isn't
already, and use the dispatcher and the listener.  The dispatcher
implements connection pooling for you, sharing a small number of
Oracle server processes between a lot of connections.  This is an
ideal setup for web applications, it also relieves the web application
from having to think about connection pooling (although I think plogon
will be slightly faster, we never tested without it).

I recently did a test with this setup, and it gave us 200+ tps with
500 "users".  Apache and the Oracle server were running on the same
machine, with 2x733 P3s and 2GB RAM.

There's a lot of knobs in the connection setup you can tune to make it
work for you: the number of simultaneous connections per dispatcher
process (we used 250), the number of dispatcher processes (we used 8)
and the number of shared Oracle server processes (I _think_ we used
8).  Our Apache config had MaxSpareServers set to 450, and during the
test it pretty much kept all Apache processes busy, just to give you
an idea of the volume this setup can handle.

 - Stig

-- 
  Stig Sæther Bakken <[EMAIL PROTECTED]>
  Fast Search & Transfer ASA, Trondheim, Norway

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Limiting # of connections to remote Oracle

2001-05-23 Thread Larry Osborn

thanks john!
this will be a big help
--Larry

""John Lim"" <[EMAIL PROTECTED]> wrote in message
9efl78$2kc$[EMAIL PROTECTED]">news:9efl78$2kc$[EMAIL PROTECTED]...
> Hi Larry,
>
> See
> http://marc.theaimsgroup.com/?l=php-dev&m=98193543028899&w=2
>
> I would create a special web server listening at port 81 to perform Oracle
> queries. Your main web servers call the port 81 server using
> fopen("http://proxyserver:81/updatemail.php?params=...";); to update the
> Oracle database.
>
> There are also tools to help you create a proxy database web server at
> http://php.weblogs.com/adodb_csv
>
> Regards, John
>
> PS: This is taken from a list of Tuning PHP and Apache tips at
> http://php.weblogs.com/tuning_apache_unix
>
> ""Larry Osborn"" <[EMAIL PROTECTED]> wrote in message
> 9eemqc$s7q$[EMAIL PROTECTED]">news:9eemqc$s7q$[EMAIL PROTECTED]...
> > Greetings all,
> > We are having serious issues with PHP4.0.5 using OCI8 and Apache 1.3.17.
> >
> > We have 4 webservers that handle our various needs for oracle. Each
server
> > has its MaxSpareServers in the httpd.conf set to 100. So that turns out
to
> > be 400 connections to the Oracle database.  We are not using persistent
> > connections, because that makes the problem worse.  Does anyone know of
a
> > way to limit the number of database connections without having to turn
> away
> > users by limiting the number of apache processes?
> >
> > We are using php+apache+oci8 to subscribe and unsubscribe people to our
> > mailing list.  We have simple select and update queries using
> non-persistent
> > connections.  Im not too sure what other information I would need to
> > provide, Im just a webdeveloper, not a sysadmin, so please bear that in
> mind
> > :)
> >
> > Thanks for any help you can give me.
> >
> > Larry Osborn
> > Web Developer
> > Napster, Inc.
> >
> >
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Limiting # of connections to remote Oracle

2001-05-22 Thread John Lim

Hi Larry,

See
http://marc.theaimsgroup.com/?l=php-dev&m=98193543028899&w=2

I would create a special web server listening at port 81 to perform Oracle
queries. Your main web servers call the port 81 server using
fopen("http://proxyserver:81/updatemail.php?params=...";); to update the
Oracle database.

There are also tools to help you create a proxy database web server at
http://php.weblogs.com/adodb_csv

Regards, John

PS: This is taken from a list of Tuning PHP and Apache tips at
http://php.weblogs.com/tuning_apache_unix

""Larry Osborn"" <[EMAIL PROTECTED]> wrote in message
9eemqc$s7q$[EMAIL PROTECTED]">news:9eemqc$s7q$[EMAIL PROTECTED]...
> Greetings all,
> We are having serious issues with PHP4.0.5 using OCI8 and Apache 1.3.17.
>
> We have 4 webservers that handle our various needs for oracle. Each server
> has its MaxSpareServers in the httpd.conf set to 100. So that turns out to
> be 400 connections to the Oracle database.  We are not using persistent
> connections, because that makes the problem worse.  Does anyone know of a
> way to limit the number of database connections without having to turn
away
> users by limiting the number of apache processes?
>
> We are using php+apache+oci8 to subscribe and unsubscribe people to our
> mailing list.  We have simple select and update queries using
non-persistent
> connections.  Im not too sure what other information I would need to
> provide, Im just a webdeveloper, not a sysadmin, so please bear that in
mind
> :)
>
> Thanks for any help you can give me.
>
> Larry Osborn
> Web Developer
> Napster, Inc.
>
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]