On Mon, Mar 04, 2002 at 11:19:54AM +0100, Takacs Istvan wrote:
> Hi,
> 
> We use mysql 1.23.47 as a database for our PHP based accounting
> system.  We use mysql_pconnect() to get a connection to the DB.
> This morning we couldn't log in because mysql sent back a 'too many
> open connection!'  (or someting like that) error message.  If I use
> the command SHOW PROCESSLIST than I can see many 'Sleep' processes.
> If I try to kill some processes by KILL <processnumber> than newer
> processes appear in the list.

Sounds like you need to decrease the amount of time that idle
connections stay around in the server before they are disconnected.

> Is there any way to kill all of the hanging processes?

Best not to get them in the first place!

> And why are so many processes if we use mysql_pconnect() which uses
> the same connection what the PHP user opened before?

mysql_pconnect() tells PHP *not* to close the connection when a page
completes.  That means there will be more open connections to the
database server.  If you have a sufficient number of Apache (or
whatever) children, you can easily over-run MySQL.

Jeremy
-- 
Jeremy D. Zawodny, <[EMAIL PROTECTED]>
Technical Yahoo - Yahoo Finance
Desk: (408) 349-7878   Fax: (408) 349-5454   Cell: (408) 685-5936

MySQL 3.23.47-max: up 25 days, processed 840,969,833 queries (386/sec. avg)

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to