Go Back   vb.org Archive > Community Discussions > Forum and Server Management
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 10-02-2010, 11:06 PM
basketmen's Avatar
basketmen basketmen is offline
 
Join Date: Nov 2006
Posts: 446
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default (How to) repair/optimize large Post table (1Gb), hang using admincp/phpmyadmin

i can repaired and optimized all tables from admincp -> Maintanance with no problem, except the Post table, because its already have large size (1Gb)

so i try repair that single table alone :

try it from admincp -> Maintanance, Its stopped loading by its self in the middle only get Please wait..., no Done message at all, its just hanged

try it from phpmyadmin, get very high load in the middle, cannot opening the server or the whm/cpanel even already more than 30 minutes, so need to restart the server from leap (manual reboot by the host company)

so is there any way to repair and optimize it guys? or it is no need to repair/optimize for years?

Nb. I use a dedicated server, here is my server specs
Intel Single Xeon E3110 3.0ghz L2 cache 6MB
Memory 4 GB DDR2 RAM
Harddisk 500 GB Sata 7200rpm
Cent OS 5.4
WHM/Cpanel

vb 3.6
Reply With Quote
  #2  
Old 10-03-2010, 04:36 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Unless there is a reason to do so, it should not be needed.

Large tables can best be repaired/optimized from the command line.
Reply With Quote
  #3  
Old 10-03-2010, 04:48 AM
basketmen's Avatar
basketmen basketmen is offline
 
Join Date: Nov 2006
Posts: 446
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

argh, after try repair from phpmyadmin the post table still cannot be used until now

and i got this error each time opening any thread MySQL Error : Table './username_dbname/post' is marked as crashed and should be repaired

the post table in phpmyadmin is saying in use









please help guys what should i do now so the forum back again
Reply With Quote
  #4  
Old 10-03-2010, 01:33 PM
snakes1100 snakes1100 is offline
 
Join Date: Dec 2001
Location: Michigan
Posts: 3,733
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

1. ssh into server
2. cd to mysql's data dir (or if you know your path)
3a. myisamchk -r /var/log/mysql/dbname/post.* (its possible at this point you may need to use the "-o" option)
3b. myisamchk -o /var/log/mysql/dbname/post.*
4. You may need to do a -r option after the -o run.
Reply With Quote
  #5  
Old 10-04-2010, 12:56 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please note that even though the webinterface (AdminCP/phpMyAdmin) might time-out, the process repairing the tables might still be running in the background.

Also it will sometimes work to run the repair twice if you get an in-use message the first time.
Reply With Quote
  #6  
Old 10-05-2010, 12:28 AM
basketmen's Avatar
basketmen basketmen is offline
 
Join Date: Nov 2006
Posts: 446
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks snake1100 and Marco van Herwaarden

i already made it optimize/repair it using myisamchk command line from ssh, i recommend vbulletin or some one create a instruction for optimize/repair large database table (1Gb or more), since i dont found working instruction in vb.com or vb.org


so here is what i do exactly based from snake1100 guide and other resources, it is working for me, but please let me know if you have more advice from this steps, i believe this will be really helping many of us :



1. ssh into server



2. Stop the MySQL server (it is needed to stop the mysql server to do this right?)
/etc/rc.d/init.d/mysql stop




3. cd to mysql's data dir (or if you know your path) :
cd /var/lib/mysql/database_name/




4a.
myisamchk -o /var/lib/mysql/database_name/post.* --> i try this, but its say not working, get message like this "Try fixing it by using the --safe-recover (-o), the --force (-f) option or by not using the --quick (-q) flag"

so i add -f and its working to repair the post table in 5 hours :
myisamchk -o -f /var/lib/mysql/database_name/post.*




4b.
myisamchk -r /var/lib/mysql/database_name/post.* (its possible at this point you may need to use the "-o" option) --> I am still didnt doing this, since step 4a is already working, do i still need do this step guys?






5. Restart MySQL again:
/etc/rc.d/init.d/mysql start










Quote:
You may need to do a -r option after the -o run.
--> Btw i am still not sure what snake1100 mean, is it mean after run the 4a step above, i need to run step 4b?


like you see guys, i own a big boards using vb now, but still dont get the right/official instruction, i search it outside vb





other sources
http://www3.wiredgorilla.com/content/view/347/58/
http://dev.mysql.com/doc/refman/5.1/...am-repair.html

http://wpguru.co.uk/2010/01/how-to-r...ommand-line-2/ --> i try this first but its not working, the server down in the middle of proccess and the ssh canceled by its self, the myisamchk command above is working, but maybe need more advice to be more perfect

--------------- Added [DATE]1286242782[/DATE] at [TIME]1286242782[/TIME] ---------------

Quote:
Originally Posted by Marco van Herwaarden View Post
Please note that even though the webinterface (AdminCP/phpMyAdmin) might time-out, the process repairing the tables might still be running in the background.

Also it will sometimes work to run the repair twice if you get an in-use message the first time.
i dont think its still running repairing using AdminCP/phpMyAdmin, the load number in whm is very high until 200-400 and cannot opening anything again including whm (normally the server load are only 1-5 in whm), when running myisamchk above the load only about 20 so the whm still can accessed

i am still didnt try repair/optimize again from AdminCP/phpMyAdmin when the table have an in use message, but i think it will same
Reply With Quote
  #7  
Old 10-05-2010, 05:29 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The manual ( Common MySQL Error Messages) will link you to a search on mysql.com listing the various repair options for the different MySQL releases and tabletypes.
Reply With Quote
  #8  
Old 10-05-2010, 05:43 AM
basketmen's Avatar
basketmen basketmen is offline
 
Join Date: Nov 2006
Posts: 446
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Marco van Herwaarden View Post
The manual ( Common MySQL Error Messages) will link you to a search on mysql.com listing the various repair options for the different MySQL releases and tabletypes.
nice link, its not bad, its only still hard enough to search in mysql.com which one tutorial that the most suitable for large database, and recommended by vb official or members to use


btw if you can please check my post no.6 above, if you have more advice please let me know
Reply With Quote
  #9  
Old 10-05-2010, 02:03 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Basketmen, have you posted over on vb.com in the Server Configuration forum? George (eva2000) may have some good suggestions on what you should do.
Reply With Quote
  #10  
Old 10-05-2010, 05:12 PM
basketmen's Avatar
basketmen basketmen is offline
 
Join Date: Nov 2006
Posts: 446
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
Basketmen, have you posted over on vb.com in the Server Configuration forum? George (eva2000) may have some good suggestions on what you should do.
ok dokey
Reply With Quote
Reply


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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:29 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04272 seconds
  • Memory Usage 2,259KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete