MySQL error leads to Wordpress categories missing

Obtain support and get your questions answered here.

MySQL error leads to Wordpress categories missing

Postby jimmybond » Mon Dec 31, 2012 6:14 pm

Hi Max,

I just found my WordPress blog cannot display any pages under tags and categories,like all tags and Categories disppeared suddenly. Checking the wordpress database reveals no error, Google tells this issue has something to do with tmp file of mysql. Also in phpmyadmin the sql query of "wp_term_relationships" table(SHOW FULL FIELDS FROM `wp_term_relationships` ;) returns error "mysql error #1 - Can't create/write to file '/tmp/#sql_33e_0.MYD' (Errcode: 17) " . Please see to this issue. Is this due to the recent update of PHP 5.4 and 5.3.19 or mysql data/file corruption caused by server overload ? Any help will be much appreciated.

Best Regards and Happy New Year!
Jimmy
jimmybond
New around here
 
Posts: 49
Joined: Sat Dec 11, 2010 7:55 am

Re: MySQL error leads to Wordpress categories missing

Postby Max » Tue Jan 01, 2013 1:28 am

Hey there

Is the problem still occurring? Apparently there was some sort of a glitch with the server overnight (well overnight for me anyway, I was asleep), but I wake up and everything seems to be in working order.
Max
Administrator
 
Posts: 1042
Joined: Sat Jul 18, 2009 3:17 pm

Re: MySQL error leads to Wordpress categories missing

Postby Max » Tue Jan 01, 2013 8:21 am

Still investigating, it appears it has somewhat randomly effected some customers but not most, and it seems to have come up without any obvious cause. I can only hope it's due to the recent cPanel update (MySQL was also updated then).

Let me know if and when it happens again.
Max
Administrator
 
Posts: 1042
Joined: Sat Jul 18, 2009 3:17 pm

Re: MySQL error leads to Wordpress categories missing

Postby jimmybond » Tue Jan 01, 2013 11:31 am

Thank you very much for the help!Now everything seems OK on my site.Googling with "Errcode: 17 MySQL" returns many similar errors so this issue seems a common error with MySQL, According to mySQL documentation,"If you get an error of the following type for some queries, it means that MySQL cannot create a temporary file for the result set in the temporary directory:Can't create/write to file '\\sqla3fe_0.ism'." So the tmp dir of mySQL must have right permissions and sufficient space for the MySQL server to write to. Maybe this problem tends to occur after a prolonged time of server overload because too many MySQL temp files filled up the disk space of tmp dir(without proper deletion after use)? If so, increasing the space for MySQL temp dir could be a possible measure and if the tmp dir is crowded with these files maybe a manual cleanup is needed. Another possible cause is the certain tmp file is locked by another mySQL instance or some file lock so access to this file is denied.This issue may indicate a file system error caused by server overload?
jimmybond
New around here
 
Posts: 49
Joined: Sat Dec 11, 2010 7:55 am

Re: MySQL error leads to Wordpress categories missing

Postby Max » Wed Jan 02, 2013 1:32 am

Unfortunately not (because that would be an easy explanation) - MySQL's tmp_dir on our server is far too big, it cannot be filled up due to "overload". The only reason there that would be applicable to our setup is

Another possible cause is the certain tmp file is locked by another mySQL instance or some file lock so access to this file is denied


Overall, I still can't come up with a good explanation for why the problem transpired 2 days ago.
Max
Administrator
 
Posts: 1042
Joined: Sat Jul 18, 2009 3:17 pm

Re: MySQL error leads to Wordpress categories missing

Postby jimmybond » Wed Jan 02, 2013 9:18 am

Max wrote:Unfortunately not (because that would be an easy explanation) - MySQL's tmp_dir on our server is far too big, it cannot be filled up due to "overload". The only reason there that would be applicable to our setup is

Another possible cause is the certain tmp file is locked by another mySQL instance or some file lock so access to this file is denied


Overall, I still can't come up with a good explanation for why the problem transpired 2 days ago.


Then the problem seems a bit more complicate. After all it has something to do with excessive server load. Maybe mysqld process hangs or does not exit gracefully? The easy working solution is to stop mysqld,clean up the tmp dir and then restart MySQL. I'll post in the forum if the issue repeats. Thx again for your help!

Cheers,
Jimmy
Last edited by jimmybond on Wed Jan 02, 2013 11:15 am, edited 1 time in total.
jimmybond
New around here
 
Posts: 49
Joined: Sat Dec 11, 2010 7:55 am

Re: MySQL error leads to Wordpress categories missing

Postby Max » Wed Jan 02, 2013 9:51 am

Mysqld process is never meant to exit. I've already restarted mysql, it automatically cleaned up the specific temporary file it apparently couldn't access (even though it did exist and had valid permissions, etc).

Has the issue occurred again? If not, I'd say there's nothing else to do....tentatively.
Max
Administrator
 
Posts: 1042
Joined: Sat Jul 18, 2009 3:17 pm

Re: MySQL error leads to Wordpress categories missing

Postby jimmybond » Wed Jan 02, 2013 11:25 am

Max wrote:Mysqld process is never meant to exit. I've already restarted mysql, it automatically cleaned up the specific temporary file it apparently couldn't access (even though it did exist and had valid permissions, etc).

Has the issue occurred again? If not, I'd say there's nothing else to do....tentatively.


Until now all is fine on my blog. Hopefully the problem is fixed~
jimmybond
New around here
 
Posts: 49
Joined: Sat Dec 11, 2010 7:55 am


Return to Support & Questions

Who is online

Users browsing this forum: No registered users and 5 guests

cron