Bam: MySQL error 28, and suddenly my queries came to a stop.
Error 28 is about disk space, usually the disk space for temp tables. The first thing to do is figure out what filesystem(s) the tables are on. SHOW VARIABLES LIKE “%dir%” will return a number of results, but the ones that matter are tmpdir and datadir.
SHOW VARIABLES LIKE “%dir%”;
basedir /
character_sets_dir /usr/share/mysql/charsets/
datadir /var/lib/mysql/
innodb_data_home_dir
innodb_log_arch_dir
innodb_log_group_home_dir ./
innodb_max_dirty_pages_pct 90
slave_load_tmpdir /tmp/
tmpdir /tmp/
As it turns out, df shows plenty of space available on all the filesystems:
# df -H
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 195G 11G 175G 6% /
/dev/sda1 98M 16M 78M 17% /boot
none 1.1G 0 1.1G 0% /dev/shm
/usr/tmpDSK 508M 12M 471M 3% /tmp
/tmp 508M 12M 471M 3% /var/tmp
Well, plenty of space if all it needs is 471MB of temp. Unfortunately, that’s not enough. The temp table is for a group/sort operation on a table that was much larger than I expected, something I realized when I looked at the table’s Data_length with SHOW TABLE STATUS.
I could change the temp directory, but unfortunately it can’t be changed dynamically, only at startup. So my choice was either to shutdown MySQL or change my query. As it turned out, it wasn’t a bad time to figure out how to write a better query.
mysql, error 28, error, disk space, temp table, table size, query optimization, mysql optimization
Posted May 1, 2007 by Casey Bisson
Categories: Technology. Tags: disk space, error, error 28, mysql, mysql optimization, query optimization, table size, temp table.
1 Comment(s)
Comments RSS
TrackBack Identifier URI
User contributed tags for this post:
mysql error 28 (130) - mysql temp dir (91) - mysql temp directory (89) - problem SHOW TABLES (85) - temp disk table (78) - How to change mysql temp directory (78) - mysql temp table location (69) - mysql out of space (65) - mysql tmp directory (60) - mysql tmp space (58) - change temp dir mysql (57) - mysql change tmpdir (49) - mysql error 2002 (46) - inurl MySQL Error (42) - mysql temporary table location (42) - error 28 (41) - out of disk space in mysql (38) - change mysql tmpdir (35) - iphone error 28 (35) - mysql tmp table location (34) - mysql temp folder (34) - mysql tmp folder (33) - temp disk tables (32) - mysql out of disk space (31) - space (28) - mysql temp space (26) - change mysql temp directory (26) - mysql tempdir (25) - temp tables (24) - optimize mysql table temp dir (23) - mysql disk space (23) - mysql temp table (22) - mysql temp table directory (22) - mysql temporary directory (21) - change mysql tmp directory (20) - mysql change temp directory (19) - error 28 mysql (16) - mysql temp (16) - mysql change tmp directory (16) - mysql iphone (15) - MySQL Temp Tables (15) - iphone mysql (14) - mysql tmpdir size (14) - mysql temp table space (14) - mysql tmpdir change (14) - mysql tmpdir (14) - mysql change tmp folder (14) - change tmpdir mysql (13) - iphone running out of disk space (13) - mysql /dev/shm (13) - mysql tmp table (13) - mysql tmp dir (13) - mysql error 152 (12) - Out of disk space writing temporary sort file (12) - out of hard drive space math error (11) - mysql tmpdir dev shm (11) - mysql show temporary tables (11) - mysql tmpdir shm (11) - mysql temp table size (11) - mysql temporary table directory (11) - mysql temp table path (11) - mysql changing tmp table size (10) - change mysql temp folder (10) - mysql tmp size (10) - Temp directory tmp is out of disk space (9) - mysql optimize disk space (9) - mysql temporary folder (9) - TMPDIR MYSQL (9) - error 28 iphone (9) - mysql tmpdir error 28 (8) - mysql error (8) - mysql optimize error (7) - mysql change tmp dir (7) - F (7) - mysql temp directory change (7) - mysql tmpdir /dev/shm (7) - you are running out of disk space iphone (7) - temp table location mysql (7) - change mysql tmp folder (7) - mysql temporary table space (7) - mysql tmpdir windows (7) - change mysql tmp dir (6) - mysql change temp dir (6) - mysql show temp tables (6) - changing mysql tmp directory (6) - iphone out of disk space (6) - iphone you are running out of disk space (6) - mysql temporary table size (6) - mysql tmp table size (6) - mysql temp tablespace (6) - mysql error 28 tmp (5) - mysql running out of table space (5) - change mysql temp dir (5) - mysql out of disk (5) - mysql show temp table (5) - mysql optimize error 28 (5) - mysql optimize temp directory (5) - mysql tmp table directory (5) - running out of disk space on iphone (5) - mysql change /tmp (5) - mysql show space (5) - mysql disk temporary table location (5) - how to change mysql tmpdir (5) - tmp table size mysql (5) - Temp directory (/tmp) is out of disk space (5) - mysql temp location (5) - change temp directory mysql (5) - mysql tmp tables location (5) - my disk space if full in iphone (4) - write error (disk full?) iphone (4) - mysql optimization (4) - 8090387420133 (4) - cache 8N1nr1Ffx9UJ maisonbisson com blog post 10744 inf (4) - MySQL Error 11 (4) - mysql temp tables disk (4) - MySQL changing temporary directory (4) - temp directory is out of disk space (4) - change tmp directory mysql (4) - mysql running out of space (4) - mysql disk (4) - mysql query disk space (4) - Created tmp disk tables (4) - Mysql show space used (4) - iphone run out of disk space (4) - mysql running out of disk space (4) - mysql tmp tables (4) - mysql change temp folder (4) - Temporary tables created on disk (4) - tmp table size (4) - mysql created tmp disk tables (4) - mysql temporary table (4) - /dev/shm mysql (4) - mysql error 28 on write (4) - Disk is full writing TEMP in MySQL (4) - temp dir mysql (4) - mysql set temp folder (4) - where mysql write temp tables (4) - mysql using tables problem disk space (4) - Disk is full writing /var/tmp/ (4) - mysql change tmp (4) - shm filesystem mysql (4) - mysql temporary table is full (4) - mysql change temporary directory (4) - mysql temp tables location (4) - MySQL TMPDIR space (3) - mysql changing temp directory (3) - tmpDSK (3) - How to change mySQL tmp directory (3) -
That has happened to me so many times when I first transferred over my blog to my new hosting. I also had the problem at work this summer. It was interesting because no one who what the problem was. Thanks for the info!