Search code examples
ubuntu-server

Incorrect key file for table '/tmp/#sql_42cd_0.MYI'; try to repair it


I recently had an issue of disk space. More than 97% of disk was full. I cleaned the disk space by clearing the log files.

The issue now i am having is the error in my api which says, Incorrect key file for table '/tmp/#sql_42cd_0.MYI'; try to repair it.

Below is the output of the df -h command i executed on the SSH
root@localhost:~# df -h Filesystem Size Used Avail Use% Mounted on /dev/xvda 24G 16G 6.4G 72% / devtmpfs 994M 4.0K 994M 1% /dev none 200M 180K 199M 1% /run none 5.0M 0 5.0M 0% /run/lock none 996M 0 996M 0% /run/shm none 100M 0 100M 0% /run/user overflow 1.0M 0 1.0M 0% /tmp
Other than this, i also tried running the myisamchk -r profiles.MYI in order to repair the .myi file but nothing seems to be working.


Solution

  • Sorted the issue. It was related with the incorrect join in the query.

    I do not understand, if the issue is related with the query then how does it echo the error
    Incorrect key file for table '/tmp/#sql_42cd_0.MYI'; try to repair it