Re: [PHP-DB] To many connections problem with LAMP

2003-09-05 Thread Mika Tuupola
On Thu, 4 Sep 2003, Balaji H. Kasal wrote:

  
  It is usually better not to use persistenc connections.
  So drop the pmysql_connect or if you really need to use
  them set set max connections higher for mysql.
 
Which problem it has? 

On a really busy site persistent connections will just
pile up and in the end the sql server will reach its
max connections limit. Unless you will do many connects
per page you will virtually gain almost nothing by
using persistent connections.

If you absolutely need to use persistent connections 
you can stop max connections filling up by dropping
MaxRequestsPerChild from httpd.conf to something 
like 150 or lower. This way unnesseccary connections
get killed when the Apache child dies.

-- 
Mika Tuupola  http://www.appelsiini.net/~tuupola/

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



Re: [PHP-DB] To many connections problem with LAMP

2003-09-04 Thread Mika Tuupola
On Wed, 3 Sep 2003, Merlin wrote:

 After doing some research it looks like this is a problem because I am 
 using pmysql_connect instead of mysql_connect.

It is usually better not to use persistenc connections.
So drop the pmysql_connect or if you really need to use
them set set max connections higher for mysql.

-- 
Mika Tuupola  http://www.appelsiini.net/~tuupola/

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



Re: [PHP-DB] Sessions Vs DB Access

2002-11-25 Thread Mika Tuupola
On Sun, 24 Nov 2002, Peter Beckman wrote:

 Don't forget that you can use the DB to store PHP Sessions as well, which
 is faster than storing the sessions in /tmp on the file system.  If you
 have well written SQL, you can have 5-30 queries per page, most of which
 should return the data in under 1/100 of a second.

Well it depends. On Solaris /tmp/ is tmpfs which is memory
based filesystem so it will essentially have speed of a
ram disk.

-- 
Mika Tuupola  http://www.appelsiini.net/~tuupola/


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




RE: [PHP-DB] resizing image with php - what is the quality?

2001-09-01 Thread Mika Tuupola

On Sat, 1 Sep 2001, Seb Frost wrote:

 imagecopyresized:  crap
 imagecopyresampled: good but requires gd  2.0

You could also use php_imlib's imlib_create_scaled_image()

-- 
Mika Tuupola  http://www.appelsiini.net/~tuupola/


-- 
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]