Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: taysys on July 31, 2020, 10:55:45 PM

Title: smf_mail_queue' is marked as crashed and last (automatic?) repair failed
Post by: taysys on July 31, 2020, 10:55:45 PM
Using version 2.0.15.
When anybody tries to send a PM the following error comes up:

smf_mail_queue' is marked as crashed and last (automatic?) repair failed
File: /var/www/humboldttuna/smf/Sources/ScheduledTasks.php
Line: 931

but they message is sent and received.

Now I see that it loops logging this error every minute.  I have to delete the error log daily as it has 100's of pages.

I've tried to go through phpMyAdmin to fix the table but it fails. So I delete it and it get recreated and starts logging the same message.

What to do??

Thank you in advance.
Bob
Title: Re: smf_mail_queue' is marked as crashed and last (automatic?) repair failed
Post by: vbgamer45 on July 31, 2020, 11:09:42 PM
How are you deleting the table in phpmyadmin?
And then rerunning the create table to rebuild smf_mail_queue
Title: Re: smf_mail_queue' is marked as crashed and last (automatic?) repair failed
Post by: taysys on July 31, 2020, 11:26:09 PM
It will not allow me to do a repair as that message comes up and dumps me out.  So I believe (I haven't done this in a while; just putting up with it) I try to do a drop.  So it either do the drop or the program recreates the table.  The table is also marked as "in use."

Thanks.
Bob
Title: Re: smf_mail_queue' is marked as crashed and last (automatic?) repair failed
Post by: Sir Osis of Liver on July 31, 2020, 11:30:00 PM
Disable mail queue, you should be able to drop table.  If you can't create clean table, import one from a scratch install.
Title: Re: smf_mail_queue' is marked as crashed and last (automatic?) repair failed
Post by: vbgamer45 on July 31, 2020, 11:31:06 PM
Drop the table then remake as follows

CREATE TABLE smf_mail_queue (
  id_mail int(10) unsigned NOT NULL auto_increment,
  time_sent int(10) NOT NULL default '0',
  recipient varchar(255) NOT NULL default '',
  body text NOT NULL,
  subject varchar(255) NOT NULL default '',
  headers text NOT NULL,
  send_html tinyint(3) NOT NULL default '0',
  priority tinyint(3) NOT NULL default '1',
  private tinyint(1) NOT NULL default '0',
  PRIMARY KEY  (id_mail),
  KEY time_sent (time_sent),
  KEY mail_priority (priority, id_mail)
) ENGINE=MyISAM;
Title: Re: smf_mail_queue' is marked as crashed and last (automatic?) repair failed
Post by: Sir Osis of Liver on July 31, 2020, 11:35:16 PM
Or import attached.
Title: Re: smf_mail_queue' is marked as crashed and last (automatic?) repair failed
Post by: taysys on August 01, 2020, 12:26:58 AM
Thanks much Guys. I'll give this all a shot in the AM when I can get the people off and go into maintenance.

Bob
Title: Re: smf_mail_queue' is marked as crashed and last (automatic?) repair failed
Post by: Arantor on August 01, 2020, 05:45:02 AM
@vbgamer making the table as MyISAM with the churn it has is why it crashes, should really use InnoDB. And need to check if the user is using UTF-8 or not to get the correct collation (without matching this up, other bad stuff happens)
Title: Re: smf_mail_queue' is marked as crashed and last (automatic?) repair failed
Post by: vbgamer45 on August 01, 2020, 07:17:53 AM
Great points ^^^.  Bob keep those changes in mind. Check your original tables structure. You can run SHOW CREATE TABLE smf_mail_queue

You can change
ENGINE=MyISAM
To
ENGINE= InnoDB


The UTF8 step Arantor is talking about is if your forum was converted or set to UTF8 and it would change the statement to this
ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
Title: Re: smf_mail_queue' is marked as crashed and last (automatic?) repair failed
Post by: taysys on August 01, 2020, 11:46:23 AM
OK, this is what I have found... since I didn't install the system (plausible deniability) the tables are MyIsam and the collation latin1_swedish_ci.  So can I change this through the myPhpAdmin control panel  (all tables or just the crashed one)?? I assume that I will have to be in Maintenance Mode to keep users out.

When I start messing with a large database in areas where I am not familiar I get a pit in the stomach ;-)

Thanks for all the assistance!

Bob