List:General Discussion« Previous MessageNext Message »
From:Bennett Haselton Date:November 22 2001 3:14am
Subject:does each database connect cause mysqld to fork?
View as plain text  
Each time I open a database handle (in perl code), does that cause a new 
process to run, a new instance of mysqld?  And each time I disconnect the 
database handle ($dbh->disconnect() in perl code), does that cause the 
number of running instances of mysqld to go down by one?

The process list on my Linux server includes several instances of mysqld:

server1:/home/bhaselto/web/html$ ps auwx | grep mysqld
root      1014  0.0  0.0  1672    0 ?        SW   Nov05   0:00 
[safe_mysqld]
mysql     1037  0.0  3.6 15172 9484 ?        S    Nov05  22:10 
/usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --
mysql     1039  0.0  3.6 15172 9484 ?        R    Nov05  19:02 
/usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --
mysql     1040  0.0  3.6 15172 9484 ?        S    Nov05   0:04 
/usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --
mysql     4518  0.0  0.0     0    0 ?        Z    21:07   0:00 [mysqld 
<defunct>]
mysql     4519  0.0  3.6 15172 9484 ?        R    21:07   0:00 
/usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --

so I was wondering if that was the explanation -- I know I have multiple 
running scripts that use the database at the same time, although I thought 
they generally didn't leave the handles open that long.

	-Bennett

bennett@stripped     http://www.peacefire.org
(425) 649 9024

Thread
does each database connect cause mysqld to fork?Bennett Haselton22 Nov
  • Re: does each database connect cause mysqld to fork?Paul DuBois23 Nov
RE: does each database connect cause mysqld to fork?Quentin Bennett22 Nov
  • RE: does each database connect cause mysqld to fork?Bennett Haselton22 Nov
    • Re: does each database connect cause mysqld to fork?Dan Nelson22 Nov