# mysql + pid count + increases

**URL:** <https://forums.percona.com/t/mysql-pid-count-increases/1029>\
**Category:** Other MySQL® Questions\
**Created:** [December 8, 2008, 2:46am UTC](https://forums.percona.com/t/mysql-pid-count-increases/1029 "2008-12-08T02:46:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![massoo](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/massoo/32/769_2.png) [@massoo](https://forums.percona.com/u/massoo)\
**Post date:** [December 8, 2008, 2:46am UTC](https://forums.percona.com/t/mysql-pid-count-increases/1029/1 "2008-12-08T02:46:47Z")

</div>

Hi,

I have mysql 4.1.22 compiled on RHEL 4 and running fine. Over the time the threads / pids of mysql keep on increasing.  
For eg :

ps -ef |grep mysql |wc -l63ps -ef |grep mysql |wc -l101

The system is Intel Dual Core, RHEL4, 300 GB SATA HDD with 16GB RAM. Also I have observed that I cannot login into mysql shell when the process count goes higher beyond 100 meaning that it takes lots of time to enter into the mysql\> shell

I am using the my-innodb-heavy-4G.cnf as my.cnf with couple of modifications like

max\_connections=1000skip-name-resolveinnodb\_file\_per\_tableinnodb\_flush\_method=O\_DIRECTlower\_case\_table\_names=1expire\_logs\_days = 10net\_read\_timeout=60net\_write\_timeout=120max\_connect\_errors = 100innodb\_locks\_unsafe\_for\_binlog=1innodb\_flush\_log\_at\_trx\_commit=2innodb\_lock\_wait\_timeout=300myisam\_repair\_threads = 10innodb\_file\_io\_threads = 20innodb\_thread\_concurrency = 16innodb\_table\_locks = 0wait\_timeout = 480

Rest of the settings remain same.

The configure command used for compiling mysql is

CFLAGS=“-static -O3 -march=nocona -funroll-loops” \CXX=gcc CXXFLAGS=“-static -O3 -march=nocona -pipe -mmmx -msse -msse2 -mfpmath=sse,387 -funroll-loops -fno-exceptions -fno-rtti -fomit-frame-pointer -felide-constructors -mtune=nocona” ./configure \ –prefix=/usr/local/mysql \ –with-mysqld-user=mysql \ –libexecdir=/usr/sbin \ –sysconfdir=/etc \ –mandir=/usr/share/man \ –with-client-ldflags=-all-static \ –with-mysqld-ldflags=-all-static \ –with-thread-safe-client \ –with-unix-socket-path=/tmp/mysql.sock \ –localstatedir=/usr/local/mysql \ –enable-assembler \ –disable-shared \ –without-readline \ –without-debug \ –without-docs \ –without-bench

and then make, make install and strip /usr/sbin/mysqld

What am I doing wrong and why the process count is increasing over the time ?

Regards  
Shann

---

<div class="post-metadata">

**Author:** ![januzi](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@januzi](https://forums.percona.com/u/januzi)\
**Post date:** [December 10, 2008, 6:11am UTC](https://forums.percona.com/t/mysql-pid-count-increases/1029/2 "2008-12-10T06:11:08Z")

</div>

What does “SHOW PROCESSLIST” show before mysql choke up ?

---

<div class="post-metadata">

**Author:** ![massoo](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/massoo/32/769_2.png) [@massoo](https://forums.percona.com/u/massoo)\
**Post date:** [December 11, 2008, 2:13am UTC](https://forums.percona.com/t/mysql-pid-count-increases/1029/3 "2008-12-11T02:13:54Z")

</div>

Hi,

I cannot invoke the show processlist as the command just hangs with no output for long time.

is the setting innodb\_file\_io\_threads = 20 too high ?

shann
