View Full Version : mySQL Memory Leak

09-11-2006, 11:00 AM
I appear to have a memory leak problem caused by mysql
I currently have 10 instances of

/usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file ...
running but not actually doing anything. These have been running since the 9th (last time I restarted mysql)
There are 2 that if you trace process on them are doing something...

Process 565 has a subprocess of 567 and then 567 has the rest as subprocesses.
But none of those subprocesses are running mysql commands - or doing anything other than eating memory. When I restart the server, applications are using 0.5Gb Memory then that creeps up to currently using 1.1Gb.
So what are those dead process and why are they hanging around?

09-11-2006, 11:05 AM
I just killed process 568 - the first subprocess of 567 and now I have 11 mysql processes running but all with new (high) numbers, all started today at 11 and free memory is back up to 3.8Gb
Looking at the mysql status - killing one of those subprocesses cause mysql to restart - so is this usage just the query cache maybe? But if so - it shouldnt increase the usage by more than 0.5Gb but the usage has changed from 1.1Gb to 270Mb

09-11-2006, 03:18 PM
I would definitely bring this up with the MySQL developers and users forums and mailing lists. If you do find something sinister like a leak, let us know. But definitely bring this up to the developer's if it looks like it could be a problem. Hopefully, if something's wrong, it will be fixed by the time we might run into the same problem.