SMF Support > Server Performance and Configuration

corrupt smf_sessions table and slow forum

(1/4) > >>

shakin:
Most importantly, I keep getting this error: Can't open file: 'smf_sessions.MYI'. (errno: 145)

So far I've got that error twice today, both times fixed by repairing the table. The forum has worked perfectly since March, but since yesterday I have had several times more traffic than usual and I had to increase my MySQL max_connections from 100 to 250 and also disable persistent connections (needed to free up connections quicker).

What I'm wondering is if there is a way to prevent the smf_sessions table from becoming corrupt. Is the problem due to lots of visitors (200+ on one forum and 100+ on a separate SMF installation using the same server), though I see the Simple Machines forum has more than that? Could it have to do with the connection changes I made yesterday? The forum does seem slow, which could be because of the high traffic or because I disabled persistent connections. Is there a better way to handle high traffic than what I did?

Thanks.

Ben_S:
root@shankly [~]# perror 145
MySQL error:  145 = Table was marked as crashed and should be repaired


Is this a dedicated server of shared hosting, and what spec is the server. Tables crashing are usually as a result of MySQL being stopped incorrectly.

I'd leave persistant connections enabled and make sure that your apache max clients is set to lower than your max mysql connections.

Also can you upload this file and post the url? http://www.simplemachines.org/community/index.php?topic=43207.msg312161#msg312161

shakin:

--- Quote from: Ben_S on August 02, 2005, 02:14:35 PM ---root@shankly [~]# perror 145
MySQL error:  145 = Table was marked as crashed and should be repaired


Is this a dedicated server of shared hosting, and what spec is the server. Tables crashing are usually as a result of MySQL being stopped incorrectly.

I'd leave persistant connections enabled and make sure that your apache max clients is set to lower than your max mysql connections.

--- End quote ---

Thanks for the reply. This is an in-house server that runs two SMF forums and one low traffic web site, with MySQL on the same server. There is no indication that MySQL has crashed or been shut down in any way. The smf_sessions table is the only one to have any problems.

The server is a P3 1ghz with 768 MB RAM. I will look into the Apache max clients and related settings, but it's more than a bit scary when a table becomes corrupt twice within a couple of hours. I'm really worried about that. There were 586 records in the table when I did the repair.

Ben_S:
It could be that MySQL was so overwhelmed with the traffic it crashed itself.

I edited my post whilst you were trying, take a look at the status script I linked too.

What version of MySQL are you running, if it's 3.x then you should upgrade as SMF is highly optimized for 4.x. Also do a search for InnoDB on these forums, you can get some major performance gains by switching certain tables to InnoDB (search for the list of ones to change).

Ben_S:
You may want to gives these a try.


--- Quote from: [Unknown] ---ALTER TABLE smf_topics
ADD INDEX numReplies (numReplies),
ADD INDEX numViews (numViews);

DROP TABLE smf_log_floodcontrol;
CREATE TABLE smf_log_floodcontrol (
  ip char(16) NOT NULL,
  logTime int(10) unsigned NOT NULL default '0',
  PRIMARY KEY (ip),
  KEY logTime (logTime)
) TYPE=HEAP;

ALTER TABLE smf_attachments
TYPE=InnoDB;
ALTER TABLE smf_collapsed_categories
TYPE=InnoDB;
ALTER TABLE smf_log_actions
TYPE=InnoDB;
ALTER TABLE smf_log_boards
TYPE=InnoDB;
ALTER TABLE smf_log_errors
TYPE=InnoDB;
ALTER TABLE smf_log_karma
TYPE=InnoDB;
ALTER TABLE smf_log_mark_read
TYPE=InnoDB;
ALTER TABLE smf_log_online
TYPE=InnoDB;
ALTER TABLE smf_log_search
TYPE=InnoDB;
ALTER TABLE smf_log_topics
TYPE=InnoDB;
ALTER TABLE smf_members
TYPE=InnoDB;
ALTER TABLE smf_pm_recipients
TYPE=InnoDB;
ALTER TABLE smf_sessions
TYPE=InnoDB;
ALTER TABLE smf_settings
TYPE=InnoDB;
ALTER TABLE smf_topics
TYPE=InnoDB;

REPLACE INTO smf_settings
   (variable, value)
VALUES ('disableTemplateEval', '1'),
   ('cache_enable', '1');

And, use a PHP accelerator like  eAccelerator or Turck MMCache.

-[Unknown]
--- End quote ---

Navigation

[0] Message Index

[#] Next page

Go to full version