I have recently been getting regular downtime with my sites getting the following error:
PHP Fatal error: Uncaught exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[HY000]: General error: 1 Can't create/write to file '/tmp/#sql_71be_0.MYD' (Errcode: 17)' in /home/dfmovies/Zend/Db/Statement/Pdo.php:227
Stack trace:
#0 /home/dfmovies/Zend/Db/Statement.php(279): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/dfmovies/Zend/Db/Adapter/Abstract.php(396): Zend_Db_Statement->execute(Array)
#2 /home/dfmovies/Zend/Db/Adapter/Pdo/Abstract.php(206): Zend_Db_Adapter_Abstract->query('DESCRIBE `urlst...', Array)
#3 /home/dfmovies/Zend/Db/Adapter/Pdo/Mysql.php(138): Zend_Db_Adapter_Pdo_Abstract->query('DESCRIBE `urlst...')
#4 /home/dfmovies/Zend/Db/Table/Abstract.php(595): Zend_Db_Adapter_Pdo_Mysql->describeTable('urlstocheck', NULL)
#5 /home/dfmovies/Zend/Db/Table/Abstract.php(528): Zend_Db_Table_Abstract->_setupMetadata()
#6 /home/dfmovies/Zend/Db/Table/Abstract.php(264): Zend_Db_Table_Abstract->_setup()
#7 /home/dfmovies/application/controllers/EditController.php(160): Zend_Db_Table_Abstract->__construct()
#8 /h in /home/dfmovies/Zend/Db/Statement/Pdo.php on line 227
The filename “#sql_71be_0.MYD” is the same across all my sites on that host, they are all trying to create/use the same single file. In my latest discussion with the host they said:
It looks like that your script uses a feature called temporary table before copying the data to actual table.
I have optimised the mysql configuration on server and enabled innodb_file_per_table which should help to prevent it from happening again.
However the sites went down again after this. Does anyone have anything they can add to try to help me resolve this, maybe suggestions for my host to try? Also would this issue be resolved if I tried to use the Zend Framework in such a way that is stops creating temporary tables?
Many thanks!