MySQL Forums
Forum List  »  MySQL Administrator

Mysql slave cannot release temp files?
Posted by: Ramon Joseph
Date: July 02, 2010 05:30AM

Hi, List,

I faced a problem for some weeks, after google around, got no luck. So this should be the right place to mention it.

I'm running debian-5.0.5 with mysql 5.1.41-3~bpo50+1-log, it serves as a dedicated slave server, no other sql queries will run here.

mysql> show processlist \G
*************************** 1. row ***************************
Id: 386
User: system user
Host:
db: NULL
Command: Connect
Time: 486
State: Waiting for master to send event
Info: NULL
*************************** 2. row ***************************
Id: 586
User: system user
Host:
db: NULL
Command: Connect
Time: 286
State: Has read all relay log; waiting for the slave I/O thread to update it
Info: NULL
*************************** 3. row ***************************
Id: 686
User: root
Host: localhost
db: NULL
Command: Query
Time: 0
State: NULL
Info: show processlist
3 rows in set (0.00 sec)


Basically it's something about the temp files that created by the slave thread. They are just keep growing. After one week, I would got hundreds of files in tmp_dir, which take some gigabytes of disk space, it's unacceptable for our productive servers.

The files look like:
==== ==== ====
admon:/var/tmp# ls \#sqldc0_2_[0-5].*
#sqldc0_2_0.frm #sqldc0_2_1.MYD #sqldc0_2_2.MYI #sqldc0_2_4.frm #sqldc0_2_5.MYD
#sqldc0_2_0.MYD #sqldc0_2_1.MYI #sqldc0_2_3.frm #sqldc0_2_4.MYD #sqldc0_2_5.MYI
#sqldc0_2_0.MYI #sqldc0_2_2.frm #sqldc0_2_3.MYD #sqldc0_2_4.MYI
#sqldc0_2_1.frm #sqldc0_2_2.MYD #sqldc0_2_3.MYI #sqldc0_2_5.frm
==== ==== ====



As Mysql's manual says that:
==== ==== ====
A TEMPORARY table is visible only to the current connection, and is dropped automatically when the connection is closed.
==== ==== ====

When I stop slave instance, these files will not disappear, but when I restart mysql, they will disappear soon.


Any suggestions please? Thanks for any input.

Options: ReplyQuote


Subject
Written By
Posted
Mysql slave cannot release temp files?
July 02, 2010 05:30AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.