MyBB Community Forums

Full Version: MySQL Data Locked (Slow Query) on Big Forum?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I was using MyBB 1.2 at shared-hosting service, No problem at all.
After upgrading in to 1.4 (offline) at MyPC, Run okay.

Until the problem start..
My Webhost said, there is a high MySQL resources and getting lock. And They moved the database in to separated Dedicated (they own) server. I see in MyBB configuration, they change not localhost (IP remote).
And run okay after few days.

2 weeks ago, I bought VPS (256MB Centos with LXAdmin and HyperVM) and setup MyBB, running alone with that server. Yes, the problem from MySQL happen again! Visitor can't access forum (stop) not responding. As, my host advice to monitor CPU and Traffic. I thought normal, and no background task running (I delete all task), also no cron job running.
My host thought, there is a scripts issue that cause slow query or something? And causing database lock for Forum. But, another database running normal at same server (like LXAdmin/HyperVM database).

And then, if happen (3-4 times a day), manually I access PHPMyAdmin and kill the locked data etc. And then, forum running again. The database already optimized, and MySQLTuning script on my server said, all setting are good.

So, with 300MB database (450MB with indexed Mybb_posts). Is that high CPU/memory, for 1.4 requirement? Now, my visitor getting un-satisfied. And give me a suggest to move another "bloating" VB or SMF Smile
Would you give some advice?

Thank You

See pics and attachment [attachment=11291]
[Image: lock2pq0.th.gif][Image: thpix.gif] [Image: lockba3.th.gif][Image: thpix.gif]
Admin CP -> Configuration -> Show Thread Options -> Show 'Similar Threads' Table -> No
Can we see your forum? Sounds big to have a 350mb DB. Usually when you hit that size you need a dedicated. If your memory on the VPS is just 256MB and you have a 350MB database then you will have problems. You should at least have double the ram of the size of your database and if possible 4x. My largest DB for mybb was about 300mb for a 500k post forum. Didn't have any issues on my server (2GB ram).

Also...consider turning off search for guests. Most locks are search related. I find that I get more signups anyways because of this.

One thing I wish mybb had built in was the ability to remove quoted quotes in posts so that it saved you database size. I hate reading lots of nested quotes anyways.
Thanks Ryan for the tips, its works! But still, less problem occurs.

Sure Labrocca, I really hate nested quote Smile
And limitting post message 5000 chars, for future purposes.

Here the screenshoot from my PHPMyAdmin.
Database (excluding index) almost 300MB after I prune many old posts.
[Image: bigrf4.th.gif]

Wanna see my forum custom MyBB portal here or directly access forum only here

Sorry, If your access slow. Because my VPS International connection only have 512 kbps. Currently, being process to upgrade into 512 MB RAM (1024 MB swap) with 1Mbps International link. I hope, this higher specs can solve my Problem.

It was, before I move to VPS. Webhosting company has big and good specs (like you mention 2Gigs RAM). But, its shared-hosting! We didnt found problem for normal traffic. At high peak hours traffic 7 am - 5 pm, sometimes forum getting slow query. My old host complaint about my resources scripts.... And others, try to resolve by moving Database to private server (remote).

Sure, no plugins activated yet. All standar MyBB 1.4.2

Any suggestion?
Or should I buy the expensive Dedicated-Host server for this small forum? Smile

Thanks in advance

PS:
before moving to MyBB, I am using PunBB thats really very fast and lightweight. But, I thought ver.1.2x "cannot handle" big database? Many problem occurs. After I found MyBB, and using this.
Nice size forum...500k post mark. That's great.

Not sure what profit you are making from the site but imho..it's time for a solid VPS with minimum 512k ram but I would shoot for 1gb.

https://ssl.jumpline.com/orders/class?filt=Virtuozzo
http://vpslink.com/openvz-vps/
https://www.liquidweb.com/cart/content/vps/VPS/Plan1
http://www.vpsland.com/ezseries.html

There are 4 decent choices.
Found one more pretty good deal:

http://www.razorservers.com/specials/specials.html
Done!!

Performance drastically better.
Just upgrade VPS to 512 RAM and 2 core CPU with exactly as prize as Link-4 from http://vpslink.com/openvz-vps

I am using local webhosting with IIX for better connection from my country visitor. International limitted to 1Mbps. So, how fast ping or speed of my VPS from your country?

Please see pics, how big MyBB consume Memory Smile

Old VPS specs with only 256 RAM - offline mode forum
[Image: serverspek0zl8.th.gif][Image: thpix.gif]

New VPS 512 RAM with 2 CPU - offline forum mode
[Image: serverbeforedw8.th.gif][Image: thpix.gif]

VPS load after 15 minutes high traffic forum started! 300 user onlin!
[Image: serverafter15minsp0.th.gif][Image: thpix.gif]

Like you see above, memory drain fast... Yellow indicator Sad
Now, I try to learn how to perform Apache+LAMP for maximum speed and performance. Any suggestion?
Those memory stats wouldn't really reflect MyBB. There are tons of other applications on a server that can be contributing to that number. PHP executes and manages the memory within MyBB's scripts and all of the memory that was created by that session would be cleared within deciseconds of the scripts execution, unless of course there are memory leaks in PHP or other programs.

Here are some of the contributing factors why it would use that much memory:
  • You have an opcode cache/accelerator turned on (which you should) and it's taking advantage of the new memory by caching code/pages
  • You have plugins / modification installed which aren't optimized properly for your large forum
  • You have an un-optimized MyBB (contributing, but minimal factor). Tutorials can be found here: http://thetikitiki.com/2007/07/20/optimi...ge-boards/ - There are also some other features that can cause problems such as the similar threads and searching (but those are related to CPU and MySQL). I have a sphinx plugin available on request (mainly because it requires advanced expertise to setup)
  • You have old versions of apache, php, mysql etc installed which could be causing memory problems/leaks
How many concurrent Apache connections do you typically get? 512MB of RAM is a bit limiting for a forum of your size, I think, but it primarily depends on the amount of traffic you're getting. My VPS server with 512MB would start choking once I had around 30-45 concurrent Apache connections.

Generally, MySQL takes around 50MB or more. Each Apache thread typically takes 12-17MB (usually closer to 17MB) of RAM, so do the calculations from there. (ignore swap - it's slow and you should try not to get your MySQL and Apache eat into swap)

For example, if you get 50 concurrent connections in during peak times, you should really look for a server with 1GB of RAM.
Thanks Ryan for this advice http://thetikitiki.com/2007/07/20/optimi...ge-boards/ Smile
I will do, what you suggest. Especially point 1 and 3.
My Server support Xcache (ON), and which one to change and how (for config.php)?
===
$config['cache_store'] = 'db'; --> change to 'memcache'
$config['memcache_host'] = 'localhost';
$config['memcache_port'] = 11211; --> is this port for Xcache?
===

MyBB display error "Your server does not have memcache support enabled."
If I use "file" cache type, MyBB cannot login.


Also thanks Zinga,
I will monitor Apache connections at peak traffic.
if you used files to store cache files. so you need to CHMOD the inc/cache folder.
Pages: 1 2