Description:
The data disk filled up due to the size of the ibtmp1 file and the database was unusable until it was restarted.
There does not appear to be any mechanism to control the size of the ibtmp1 file or to have InnoDB abort a query when the size of the ibtmp1 file exceeds a specified threshold.
There does not appear to be any mechanism to shrink the size of the itbmp1 file after the query finishes or is killed.
Filesystem Size Used Avail Use% Mounted on
/dev/xvdf 100G 100G 308K 100% /opt/mysql/dbdata1
# ls -lt
total 64997480
-rw-r----- 1 mysql mysql 60978888704 Aug 11 16:15 ibtmp1
-rw-r----- 1 mysql mysql 31457280 Aug 11 16:15 xb_doublewrite
-rw-rw---- 1 mysql mysql 5538578432 Aug 11 16:15 ibdata1
How to repeat:
2016-08-11T16:00:42.484647Z 1901698 [ERROR] InnoDB: posix_fallocate(): Failed to preallocate data for file /opt/mysql/dbdata1/progression-p0/ibtmp1, desired size 67108864 bytes. Operating system error number 28. Check that the disk is not full or a disk quota exceeded. Make sure the file system supports this function. Some operating system error numbers are described at http://dev.mysql.com/doc/refman/5.7/en/ operating-system-error-codes.html
2016-08-11T16:00:42.837826Z 1901698 [Warning] InnoDB: Retry attempts for writing partial data failed.
2016-08-11T16:00:42.837856Z 1901698 [ERROR] InnoDB: Write to file /opt/mysql/dbdata1/progression-p0/ibtmp1failed at offset 60978888704, 1048576 bytes should have been written, only 0 were written. Operating system error number 28. Check that your OS and file system support files of this size. Check also that the disk is not full or a disk quota exceeded.
2016-08-11T16:00:42.837885Z 1901698 [ERROR] InnoDB: Error number 28 means 'No space left on device'
2016-08-11T16:00:42.837892Z 1901698 [Note] InnoDB: Some operating system error numbers are described at http://dev.mysql.com/doc/refman/5.7/en/operating-system-error-codes.html
2016-08-11T16:00:42.837905Z 1901698 [Warning] InnoDB: Error while writing 67108864 zeroes to /opt/mysql/dbdata1/progression-p0/ibtmp1 starting at offset 60947431424
2016-08-11T16:00:42.837930Z 1901698 [ERROR] /usr/sbin/mysqld: The table '/opt/mysql/dblogs1/progression-p0/tmp/#sql_17ad_0' is full
2016-08-11T16:00:42.837954Z 1901155 [ERROR] InnoDB: posix_fallocate(): Failed to preallocate data for file /opt/mysql/dbdata1/progression-p0/ibtmp1, desired size 35651584 bytes. Operating system error number 28. Check that the disk is not full or a disk quota exceeded. Make sure the file system supports this function. Some operating system error numbers are described at http://dev.mysql.com/doc/refman/5.7/en/ operating-system-error-codes.html
2016-08-11T16:00:42.838401Z 1901155 [Warning] InnoDB: Retry attempts for writing partial data failed.
2016-08-11T16:00:42.838477Z 1901155 [Warning] InnoDB: Error while writing 35651584 zeroes to /opt/mysql/dbdata1/progression-p0/ibtmp1 starting at offset 60978888704
2016-08-11T16:00:42.838498Z 1901155 [ERROR] /usr/sbin/mysqld: The table '/opt/mysql/dblogs1/progression-p0/tmp/#sql_17ad_1' is full
2016-08-11T16:03:27.127626Z 0 [Note] InnoDB: Dumping buffer pool(s) to /opt/mysql/dbdata1/progression-p0/ib_buffer_pool
2016-08-11T16:03:27.167900Z 0 [ERROR] InnoDB: Cannot write to '/opt/mysql/dbdata1/progression-p0/ib_buffer_pool.incomplete': No space left on device
2016-08-11T16:11:01.538832Z 1904299 [ERROR] InnoDB: posix_fallocate(): Failed to preallocate data for file ./Progression_2/progression_transitions.ibd, desired size 4194304 bytes. Operating system error number 28. Check that the disk is not full or a disk quota exceeded. Make sure the file system supports this function. Some operating system error numbers are described at http://dev.mysql.com/doc/refman/5.7/en/ operating-system-error-codes.html
2016-08-11T16:11:01.539305Z 1904299 [Warning] InnoDB: Retry attempts for writing partial data failed.
2016-08-11T16:11:01.539386Z 1904299 [Warning] InnoDB: Error while writing 4194304 zeroes to ./Progression_2/progression_transitions.ibd starting at offset 15028191232
2016-08-11T16:11:01.542390Z 1904299 [ERROR] /usr/sbin/mysqld: The table 'progression_transitions' is full
2016-08-11T16:11:01.576896Z 1904096 [ERROR] InnoDB: posix_fallocate(): Failed to preallocate data for file ./Progression_2/progression_transitions.ibd, desired size 4194304 bytes. Operating system error number 28. Check that the disk is not full or a disk quota exceeded. Make sure the file system supports this function. Some operating system error numbers are described at http://dev.mysql.com/doc/refman/5.7/en/ operating-system-error-codes.html
2016-08-11T16:11:01.577062Z 1904096 [Warning] InnoDB: Retry attempts for writing partial data failed.
2016-08-11T16:11:01.577070Z 1904096 [Warning] InnoDB: Error while writing 4194304 zeroes to ./Progression_2/progression_transitions.ibd starting at offset 15028191232
2016-08-11T16:11:01.577712Z 1904096 [ERROR] /usr/sbin/mysqld: The table 'progression_transitions' is full
2016-08-11T16:11:03.570897Z 1904263 [ERROR] InnoDB: posix_fallocate(): Failed to preallocate data for file ./Progression_2/progression_transitions.ibd, desired size 4194304 bytes. Operating system error number 28. Check that the disk is not full or a disk quota exceeded. Make sure the file system supports this function. Some operating system error numbers are described at http://dev.mysql.com/doc/refman/5.7/en/ operating-system-error-codes.html
2016-08-11T16:11:03.571053Z 1904263 [Warning] InnoDB: Retry attempts for writing partial data failed.
2016-08-11T16:11:03.571060Z 1904263 [Warning] InnoDB: Error while writing 4194304 zeroes to ./Progression_2/progression_transitions.ibd starting at offset 15028191232
2016-08-11T16:11:03.575515Z 1904263 [ERROR] /usr/sbin/mysqld: The table 'progression_transitions' is full
2016-08-11T16:11:03.706533Z 1904300 [ERROR] InnoDB: posix_fallocate(): Failed to preallocate data for file ./Progression_2/progression_transitions.ibd, desired size 4194304 bytes. Operating system error number 28. Check that the disk is not full or a disk quota exceeded. Make sure the file system supports this function. Some operating system error numbers are described at http://dev.mysql.com/doc/refman/5.7/en/ operating-system-error-codes.html
2016-08-11T16:11:03.706996Z 1904300 [Warning] InnoDB: Retry attempts for writing partial data failed.
2016-08-11T16:11:03.707076Z 1904300 [Warning] InnoDB: Error while writing 4194304 zeroes to ./Progression_2/progression_transitions.ibd starting at offset 15028191232
2016-08-11T16:11:03.707745Z 1904300 [ERROR] /usr/sbin/mysqld: The table 'progression_transitions' is full
2016-08-11T16:11:04.303713Z 1904299 [ERROR] InnoDB: posix_fallocate(): Failed to preallocate data for file ./Progression_2/progression_transitions.ibd, desired size 4194304 bytes. Operating system error number 28. Check that the disk is not full or a disk quota exceeded. Make sure the file system supports this function. Some operating system error numbers are described at http://dev.mysql.com/doc/refman/5.7/en/ operating-system-error-codes.html
2016-08-11T16:11:04.304167Z 1904299 [Warning] InnoDB: Retry attempts for writing partial data failed.
2016-08-11T16:11:04.304264Z 1904299 [Warning] InnoDB: Error while writing 4194304 zeroes to ./Progression_2/progression_transitions.ibd starting at offset 15028191232
2016-08-11T16:11:04.304953Z 1904299 [ERROR] /usr/sbin/mysqld: The table 'progression_transitions' is full
2016-08-11T16:11:04.800155Z 1904300 [ERROR] InnoDB: posix_fallocate(): Failed to preallocate data for file ./Progression_2/progression_transitions.ibd, desired size 4194304 bytes. Operating system error number 28. Check that the disk is not full or a disk quota exceeded. Make sure the file system supports this function. Some operating system error numbers are described at http://dev.mysql.com/doc/refman/5.7/en/ operating-system-error-codes.html
2016-08-11T16:11:04.800635Z 1904300 [Warning] InnoDB: Retry attempts for writing partial data failed.
2016-08-11T16:11:04.800721Z 1904300 [Warning] InnoDB: Error while writing 4194304 zeroes to ./Progression_2/progression_transitions.ibd starting at offset 15028191232
2016-08-11T16:11:04.801403Z 1904300 [ERROR] /usr/sbin/mysqld: The table 'progression_transitions' is full
2016-08-11T16:11:05.432712Z 1904299 [ERROR] InnoDB: posix_fallocate(): Failed to preallocate data for file ./Progression_2/progression_transitions.ibd, desired size 4194304 bytes. Operating system error number 28. Check that the disk is not full or a disk quota exceeded. Make sure the file system supports this function. Some operating system error numbers are described at http://dev.mysql.com/doc/refman/5.7/en/ operating-system-error-codes.html
Suggested fix:
The integrity of the database is more important than a running query that would fill the disk. It is more important to protect the database and abort the query than to fill the disk.
Provide a mechanism for the automatic cleanup of the ibtmp1 file.
Provide configurable limits on the size of the ibtmp1 file.
Provide a mechanism for the automatic aborting of queries that are causing the disk to fill up.
Provide a mechanism for the manual resizing of the ibtmp1 file.