MySQL/Writing file error (Errcode 28)

后端 未结 10 1849
慢半拍i
慢半拍i 2020-11-29 04:36

I have the following error with one of our web applications -

Query3 failed: Error writing file \'/tmp/MY1fnqpm\' (Errcode: 28) ... INSERT MailList... (remo         


        
相关标签:
10条回答
  • 2020-11-29 04:57

    We have experienced similar issue, and the problem was MySQL used /tmp directory for its needs (it's default configuration). And /tmp was located on its own partition, that had too few space for big MySQL requests.

    For more details take a look for this answer: https://stackoverflow.com/a/3716778/994302

    0 讨论(0)
  • 2020-11-29 04:59

    This error occurs when you don't have enough space in the partition. Usually MYSQL uses /tmp on linux servers. This may happen with some queries because the lookup was either returning a lot of data, or possibly even just sifting through a lot of data creating big temp files.

    Edit your /etc/mysql/my.cnf

    tmpdir = /your/new/dir

    e.g

    tmpdir = /var/tmp

    Should be allocated with more space than /tmp that is usually in it's own partition.

    0 讨论(0)
  • 2020-11-29 05:00

    You can also try using this line if the other doesn't work:

    du -sh /var/lib/mysql/database_Name

    You may also want to check with your host and see how big they allow your databases to be.

    0 讨论(0)
  • 2020-11-29 05:06

    Run the following code:

    du -sh /var/log/mysql

    Perhaps mysql binary logs filled the memory, If so, follow the removal of old logs and restart the server. Also add in my.cnf:

    expire_logs_days = 3

    0 讨论(0)
提交回复
热议问题