Go Back   Web Server Hosting Forum by BODHost > Support > MySQL Issues.
 

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 10-10-08, 20:18
BOD Member
 
Join Date: Oct 2008
Posts: 30
Default Mysql database taking too much memory.

Sometimes database taking too much memory and such behavior of database dies or crashes the server which caused due to corrupted MySQL database. Try to do the following:

1) Kill the mysql server

Quote:
/etc/rc.d/init.d/mysql stop
2) Repair all MySQL databases:

Quote:
myisamchk -r /var/lib/mysql/*/*.MYI
or if you already new the database name which causing the problem then repair it by using following command.
Quote:
root@server [/var/lib/mysql]#mysqlcheck -r -o database name
3) Start mysql again:

Quote:
/etc/rc.d/init.d/mysql start
__________________
Regards
George
Reply With Quote
  #2 (permalink)  
Old 02-12-09, 16:53
BOD Member
 
Join Date: Jan 2009
Posts: 98
Default

Nice tip, I luckily haven't had that problem yet but I'll be sure to refer to this thread if my MySQL goes haywire!

Another thing that I think is worth mentioning is that if the database still uses a lot of memory after doing that then a possible reason might be that your website is having a heavy amount of traffic at that moment, at that point you might want to check if it's legit traffic or someone trying to crash your server.
Reply With Quote
  #3 (permalink)  
Old 02-14-09, 12:20
BodShane's Avatar
Chief Operating Officer
 
Join Date: Dec 2006
Posts: 1,087
Send a message via AIM to BodShane Send a message via MSN to BodShane
Default

If someone is, make sure you report the same to your service provider immediately and begin the firewall customization.

Regards,

Shane Phillips
__________________
Redundant Dedicated Server Hosting Solutions Only at BODHost
24x7 Toll-Free ph. : +1. 866-662-0909
Email : sales@bodhost.com | MSN : sales@bodhost.com
Reply With Quote
  #4 (permalink)  
Old 02-16-09, 12:34
BOD Member
 
Join Date: Jan 2009
Posts: 73
Default

Another tip if your database is doing the same queries a lot is to cache your pages and only re-run the queries when the content changes - that way you only perform one set of queries and generate static pages then re-generate the pages when a change is made to the database - It took me a long time to learn this, but it was one of the best things I have learned.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump


All times are GMT -6. The time now is 02:34.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
Copyright © 1999-2012, BODHost Ltd. All rights reserved.