Re: [PHP-DB] Limited connections to the database. .

2005-10-27 Thread Jason

Norland, Martin wrote:


http://www.google.com/search?q=oracle+limit+client+connections

http://www.oracle.com/technology/pub/articles/php_experts/scaling_oracle
_and_php.html

Summary - either you're not using persistent connections, or your site
is just very busy.  If it's just that the site is busy, best you can do
is just limit things on the website end.  If the problem is no
persistent connections - then you'll want to switch them on if you're
doing multiple queries/page.  You also want to make sure any information
that doesn't need to be pulled from the database isn't (perhaps there
are some global settings/etc. that change once a month, cache them
globally somewhere and don't keep requesting them so often) - there may
not be any such data, but then again, there may be.

cheers,
- Martin Norland, Sys Admin / Database / Web Developer, International
Outreach x3257

The opinion(s) contained within this email do not necessarily represent
those of St. Jude Children's Research Hospital.


-Original Message-
From: Marcos R. Cardoso [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 17, 2005 5:37 AM

To: php-db@lists.php.net
Subject: [PHP-DB] Limited connections to the database. .

Hello to everyone,

we have been using an Apache server here at work (I work in a Library) 
where PHP/ASP scripts query the database very frequently (in the near 
future only PHP scripts will be used). The DBAs have recently complained


that our webserver is performing the queries in a high speed and many 
times in a second. It worried them and they are asking if we could limit


the connections to the database to a low number. As an example they told

us that other applications in other webserver uses Tomcat to run Java, 
and there they managed to limit the number of active connections at the 
same time.


I would like to know if it's possible to make something similar, and I'd

like to know too if we have to configure the PHP or the Apache.

Our environment is listed below:

Windows 2003 Server
Apache 2.0.54
PHP 4.4.0
Sun Chili!Soft ASP 3.6.2
MySQL 4.0.20a
Oracle 9i (through a Oracle 8i NetClient)


TIA,
Marcos R. Cardoso
Blumenau
Brazil

 

I was wondering if anyone thought managing multiple DBs in one script 
was feasible, let alone efficient?


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



Re: [PHP-DB] Limited connections to the database. .

2005-10-27 Thread Jason
Sorry, I should've replied to your post first, but, have you tried 
manually limiting the connections via PHP?

Code used from Omega Engine (Copyright Omega Vortex):

$ini_data = $engine-ini_data['file'];
setup_errors();
if ($ini_data['DB']['connections']  5) {
   $engine-error = There are too many connections to the database, 
please try again later.;

   $engine-toggle_errbits(ERR_CONNECT);
   $engine-engine_die();
}

That code checks the connections value in the ini file to see if it's 
greater than 5, if it is, it returns an error telling the visitor to try 
again later.


Please note in order to make this work, at least 2-3 other functions 
would have to be used.  I'd be more than happy to write them for you if 
you need it.


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



RE: [PHP-DB] Limited connections to the database. .

2005-10-17 Thread Norland, Martin
http://www.google.com/search?q=oracle+limit+client+connections

http://www.oracle.com/technology/pub/articles/php_experts/scaling_oracle
_and_php.html

Summary - either you're not using persistent connections, or your site
is just very busy.  If it's just that the site is busy, best you can do
is just limit things on the website end.  If the problem is no
persistent connections - then you'll want to switch them on if you're
doing multiple queries/page.  You also want to make sure any information
that doesn't need to be pulled from the database isn't (perhaps there
are some global settings/etc. that change once a month, cache them
globally somewhere and don't keep requesting them so often) - there may
not be any such data, but then again, there may be.

cheers,
- Martin Norland, Sys Admin / Database / Web Developer, International
Outreach x3257

The opinion(s) contained within this email do not necessarily represent
those of St. Jude Children's Research Hospital.


-Original Message-
From: Marcos R. Cardoso [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 17, 2005 5:37 AM
To: php-db@lists.php.net
Subject: [PHP-DB] Limited connections to the database. .

Hello to everyone,

we have been using an Apache server here at work (I work in a Library) 
where PHP/ASP scripts query the database very frequently (in the near 
future only PHP scripts will be used). The DBAs have recently complained

that our webserver is performing the queries in a high speed and many 
times in a second. It worried them and they are asking if we could limit

the connections to the database to a low number. As an example they told

us that other applications in other webserver uses Tomcat to run Java, 
and there they managed to limit the number of active connections at the 
same time.

I would like to know if it's possible to make something similar, and I'd

like to know too if we have to configure the PHP or the Apache.

Our environment is listed below:

Windows 2003 Server
Apache 2.0.54
PHP 4.4.0
Sun Chili!Soft ASP 3.6.2
MySQL 4.0.20a
Oracle 9i (through a Oracle 8i NetClient)


TIA,
Marcos R. Cardoso
Blumenau
Brazil

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

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



RE: [PHP-DB] Limited connections to the database

2005-10-17 Thread Bastien Koert
Some good ideas in this 
(http://marc.theaimsgroup.com/?l=php-devm=98193543028899w=2) post...


Here is one 
(http://www.oracle.com/technology/pub/articles/deployphp/lim_deployphp.html) 
from oracle on this as well


Bastien




From: Marcos R. Cardoso [EMAIL PROTECTED]
To: php-db@lists.php.net
Subject: [PHP-DB] Limited connections to the database
Date: Mon, 17 Oct 2005 07:36:41 -0300

Hello to everyone,

we have been using an Apache server here at work (I work in a Library) 
where PHP/ASP scripts query the database very frequently (in the near 
future only PHP scripts will be used). The DBAs have recently complained 
that our webserver is performing the queries in a high speed and many times 
in a second. It worried them and they are asking if we could limit the 
connections to the database to a low number. As an example they told us 
that other applications in other webserver uses Tomcat to run Java, and 
there they managed to limit the number of active connections at the same 
time.


I would like to know if it's possible to make something similar, and I'd 
like to know too if we have to configure the PHP or the Apache.


Our environment is listed below:

Windows 2003 Server
Apache 2.0.54
PHP 4.4.0
Sun Chili!Soft ASP 3.6.2
MySQL 4.0.20a
Oracle 9i (through a Oracle 8i NetClient)


TIA,
Marcos R. Cardoso
Blumenau
Brazil

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



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