Support » Fixing WordPress » Posts "uncategorized", "Missing a Temp Folder", MySQL error message

  • Resolved zz298


    I run a fairly large WordPress-driven site (around 700k uniques/month) and for the past few months, we have been experiencing a very strange error once a week. (Almost once every seven days, like clockwork.) I think it’s PHP/MySQL crash-related, however my knowledge of these is limited and I’m hoping someone here will be able to help.

    Here’s what happens when this problem occurs:

    1. Posts display as usual on the homepage, however every post’s category changes to “uncategorized”, as does their permalink (we use the /category/post-title URL structure)
    2. Our authors can edit and create posts as usual, however when they try to upload photos they get an error that WordPress is “missing a temporary folder”
    3. When trying to view comments, the number of pending comments appears in the Admin sidebar, however when you click on it to moderate comments, it says there are “0 Comments”.
    4. Our sidebar widgets are unable to pull “Recent Posts” and “Featured Posts” to display on the homepage. These widgets go blank.
    5. A look at our mysqld.log file shows the following error happening multiple times when this occurs: /usr/libexec/mysqld: Sort aborted.
    6. Sometimes when this happens, this error also displays in the mysqld.log file: Incorrect key file for table ‘/tmp/#sql_c9d_113.MYI’; try to repair it
      [ERROR] /usr/libexec/mysqld: Incorrect key file for table ‘/tmp/#sql_c9d_101.MYI’; try to repair it

    These problems persist until I restart the server, which fixes this, then everything will be fine for another week until all of these things happen again. The cycle repeats – a server restart fixes it for about seven days, then it’s back again.

    I’ve done some research and I think it might have to do with memory on our server, however I’m at a loss for how to fix this. Any suggestions? Possible fixes? Any logs I should take a look at? Any help would be seriously appreciated.

Viewing 1 replies (of 1 total)
  • Wanted to update this – I think I mostly solved the problem. Our site is still experiencing some other strange errors once a week, however all the errors I mentioned above are now fixed due to tweaking a few things with the server configuration.

    Here’s how I went about fixing it, in case anyone else has this problem:

    I found this Stack Overflow page was key to fixing this – I found out that my server was configured with /tmp on its own partition, and was only allocated 100M of space. The errors I listed above were caused by the /tmp folder running out of space and MySQL not having enough space to write to.

    To fix this, I reconfigured MySQL to use a new temp folder I created on our main partition (as illustrated here). As soon as I did that, the errors stopped completely.

    Hope this helps someone with a similar issue!

Viewing 1 replies (of 1 total)
  • The topic ‘Posts "uncategorized", "Missing a Temp Folder", MySQL error message’ is closed to new replies.