Justtechjobs.com Find a programming school near you






Online Campus Both


php3-list | 2000051

Re: [PHP3] oracle connection / process problem From: Alex Turner (musicmaker <email protected>)
Date: 05/13/00

I would try limitting the number of apache threads to just under half the
maximum number of threads allowed by a user (which is something you can
change in the kernel btw) and see how that works. It should at least stop
the machine crashing dying. (although this is a usefull piece of
information because I am also using PHP-Oracle, and would be interested to
see how it performs under serious load)

Alex T

On Fri, 12 May 2000, Alex Black wrote:

> hi,
>
> I'm stress testing a PHP / Oracle application, and have noticed that I can
> kill the machine quite easily...
> --------------
> 3104 ? 00:00:00 httpd
> 3111 ? 00:00:00 oracle
> 3105 ? 00:00:02 httpd
> 3108 ? 00:00:03 oracle
> 3106 ? 00:00:06 httpd
> 3115 ? 00:00:07 oracle
> --------------
>
> this type of thing expands very rapidly until oracle reaches its process
> limit, and the machine dies.
>
> My Database connection function, which is called every time a page is
> loaded:
>
> -------------------------------
> function db_connect(){
> putenv("ORACLE_SID=LOCM");
> putenv("ORACLE_HOME=/export/home/oracle/.../");
> global $oracle_username;
> $oracle_username = "username";
> global $oracle_password;
> $oracle_password = "password";
> if (empty($ret)) {
> $ret =  <email protected>($oracle_username,$oracle_password);
> db_check_errors($php_errormsg);
> }
> return $ret;
> }
> -------------------------------
>
> I do not call a close function at the end of every page, instead I am trying
> to check for the existence of a connection... but I must be doing it wrong.
>
> What techniques should I be using to solve this scale problem?
>
> any help much appreciated.
>
> thanks,
>
> _alex
>
>
>
> --
> PHP 3 Mailing List <http://www.php.net/>
> To unsubscribe, send an empty message to php3-unsubscribe <email protected>
> To subscribe to the digest, e-mail: php3-digest-subscribe <email protected>
> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3
> To contact the list administrators, e-mail: php-list-admin <email protected>
>

-- 
PHP 3 Mailing List <http://www.php.net/>
To unsubscribe, send an empty message to php3-unsubscribe <email protected>
To subscribe to the digest, e-mail: php3-digest-subscribe <email protected>
To search the mailing list archive, go to: http://www.php.net/mailsearch.php3
To contact the list administrators, e-mail: php-list-admin <email protected>