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 Balaji H. Kasal
> 
> > 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.

   Which problem it has? 

Bec' I am using it without any problem.

Regards,
--Balaji


-- 
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] To many connections problem with LAMP

2003-09-03 Thread CPT John W. Holmes
From: "Merlin" <[EMAIL PROTECTED]>
> I am getting more and more "to many connections" errors on my web
> application buid with LAMP.
>
> After doing some research it looks like this is a problem because I am
> using pmysql_connect instead of mysql_connect.
>
> Istn't it better to use persistant connections? There are about 14000 PI
> the system has to serve each day. It looks like this is close to the
> limit? The server itself is running on about 10%cpu. Is there a way to
> increase the amount of connections possible?
>
> Can anybody give me a suggestion on how to solve this problem and where
> to go from here?

You can set a higher max connection level with a my.cnf file. It's all
explained on the MySQL site.

Also, make sure you read the ENTIRE PAGE (with all notes) on the
mysql_connect() and mysql_pconnect() manual pages. There are really specific
configurations where using pconnect() is useful, otherwise it doesn't help
at all(and may hinder).

---John Holmes...

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



[PHP-DB] To many connections problem with LAMP

2003-09-03 Thread Merlin
Hello,

I am getting more and more "to many connections" errors on my web 
application buid with LAMP.

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

Istn't it better to use persistant connections? There are about 14000 PI
the system has to serve each day. It looks like this is close to the 
limit? The server itself is running on about 10%cpu. Is there a way to 
increase the amount of connections possible?

Can anybody give me a suggestion on how to solve this problem and where 
to go from here?

Thanx in advance.

Regards,

Merlin

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