Solving Error “ERROR 1 (HY000): Can’t create/write to file ‘/tmp/#sql_9f3_0.MYI’ (Errcode: 17)”

March 31st, 2015 - Posted by Steve Marks to MySQL, PHP, Web Development.

Recently a site that we manage stopped working all of a sudden. The error being returned from the MySQL query was as follows:

ERROR 1 (HY000): Can't create/write to file '/tmp/#sql_9f3_0.MYI' (Errcode: 17)

The error states that a file in the ‘/tmp/’ folder can’t be written to, but why?

My initial thoughts were that it might be down to permissions on the folder. That would be odd however as it’s been fine for many years. Sure enough, the permissions on the folder were fine. So what else would cause an error like this?

The Solution

After much investigation, it turns out that the /tmp/ file on the server was full. Although there were only about 20 files in this folder, a couple of them were huge.

I’m not sure where these huge files originated from, however after removing them the site in question came instantly back to life.

Tags:
This entry was posted on Tuesday, March 31st, 2015 at 8:38 pm by +Steve Marks and is filed under MySQL, PHP, Web Development. You can follow any responses to this entry through the RSS 2.0 feed.
Comments...

Fear not, we won't publish this

Comments (0)

No comments have been left yet. Be the first