• Resolved zefefre

    (@zefefre)


    Hello, just today I saw this kind of error on every page on my blog.

    WordPress database error: [Can’t create/write to file ‘/tmp/#sql_7719_0.MYD’ (Errcode: 17)]
    SELECT DISTINCT * FROM wp_posts WHERE 1=1 AND post_date_gmt <= ‘2006-05-03 12:54:59’ AND (post_status = “publish”) AND post_status != “attachment” GROUP BY wp_posts.ID ORDER BY post_date DESC LIMIT 0, 7

    Then I found out that the file #sql_7719_0.MYD already exist in tmp folder. The error gone after I deleted the #sql_7719_0.MYD file.

    I dont understand why the #sql_7719_0.MYD was already there, does anyone have any idea to prevent this kind of problem so it wont happen again in the future?

    Thanks,
    zefefre

Viewing 4 replies - 1 through 4 (of 4 total)
  • This is a mysql error which only your host can solve.

    Email them with that error.

    Where would that file be? In the tmp folder in your root directory? I’m getting a similar message and while I’m sure UltraSurge’s SQL is the problem, I’m anxious to fix it myself fast…

    You might try a mysql forum… that’s a bit far afield for us here at the WP support forum!

    Maybe you could try and do a “repair” in phpMyAdmin or a similar tool, but odds are you’ll need your host’s support.

    If you not have a root server your hosters admin has to do the job!

    You have too clean up your servers /tmp/ -directory

    The second step you should check the servers error-logfiles
    if there are mysql-server or general hangups like these:

    “too many open files” or “not enough mem”
    you sholud check shell command “ulimit -n”:
    should not be 1024. good is 16384
    you can put it in a early started startup script:

    !! Its important to change #!/usr/bin/sh to #!/usr/bin/bash
    ulimit -n 16384

    Check also
    “sysctl -n fs.file-max”
    should be at least 16384 better 65536 or higher (Be carefull if you have a cheap virtual root server, it should not be too high)

    You can put this into /etc/sysctl.conf (debian-linux):
    fs.file-max=65536

    At last you need an reboot and than the problem shold be done.

    But the 2nd posibility is:
    you (or your hosting provider) have too mach virtuell servers on
    one server (too less memory or too much processes running),
    so you have too manage that.
    Or you have to change the provider or take an real dedicated root-server.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Can’t create/write to file error’ is closed to new replies.