MyBB Community Forums

Full Version: Very High Memory Usage
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8
It actually loads pretty quick for me.
I wish it would load quick for my users, but folks have been asking about the speed since our move from vB3.7 last month.
reduce the PHP memory limit to 32-64M. with some luck, whatever is eating your memory will also trigger the memory allocation error. otherwise you'll just have to debug what's eating the memory. If it's a plugin, printing out the memory usage before / after each plugin was loaded, and before / after each hook was called, might help locating the culprit. also try dumping the globals after the page was generated, in case it's anything in there.
When the limit was lower, our caches weren't building. All usergroup permissions were missing and uneditable. Could reducing the memory reset these usergroup permissions?

Could it be anything other than the plugins? Look at this beta site: http://stratics.com/forum/ . Not only does it have 159,000 more members and 1.5 million more posts, but it has more plugins installed. Yet, look at its index page statistics summary:

Quote:Generated in 0.7075229 seconds (68.65% PHP / 31.35% MySQL)
SQL Queries: 13 / Global Parsing Time: 0.3594069 / Memory Usage: 24.75 MB
PHP version: 5.2.6-1+lenny9 / Server Load: 1.69 / GZip Compression: Enabled

That's way faster, despite more users, more content, more plugins.
If its ok with you, I would like to test this on my local system. Is it possible for me to get an sql dump of your database? You can remove any sensitive info you may have in there. If you are ok with sending me the dump then deactivate all the plugins you have before creating the dump.

If sharing the sql dump is not an option then I can only suggest options for you to try and troubleshoot this. I would start with echoing the memory usage in certain places and before and after the cache variables are initiated to find out which one is the memory hog then we can go from there to find how to optimize it.


(2011-04-08, 12:27 PM)Yaldaram Wrote: [ -> ]The values shown there do not mean that thats how much memory is being used constantly by the forum, it just shows how many MBs of memory were used in the 0.05seconds that the script took to run.
Also those values are pretty standard for a new install of a forum or any other php/mysql application of this size.

You should at least check if the solution even applies here before blindly copy pasting a response I gave in another thread. These values are definitely not standard for a MyBB forum.

The most baffling thing is the vast differences between our staff forums (index generation: 2.5 sec) with fewer users, fewer posts, and fewer plugins and the beta of our public forums (index generation: 0.7 sec), with more users, more posts, and more plugins. Both are on the same server and both were merged from vB3.7 using the MyBB merge system.

I'll do my best to get you an SQL dump. What's the best way to go about this? And thank you for being willing to take a look!
Easiest would be to do it through phpmyadmin. Just export it to a file and send me the file.

You can also use the backup option in mybb under Admincp >> Tools & Maintenance
Okies, email me ([email protected]) so that I will know what email address to send it to. Also, let me know if you have a preferred filetype. Thanks very much!
Amount of data and users shouldn't matter.

I would check your database indexes. You can query for all of them but am on my iPhone now so can't give you exact code.

Do this on the test then compare it to you production database this should at least tell you whether the same indexes are in place.

If your db is not indexed correctly then queries will take longer and consume more memory.

Besides those plugins do you have your own code in there anywhere? Particularly with lots of joins?

Finally these steps can help you eliminate database or front end.

Disable each of the plugins 1 by 1 and test the front end speed

If there is a difference after 1 then you know that's your cause.

The other thing is switch to the default theme and again see if this helps.

Those at least give you baseline information
Are the two forums you described on the same server?
Pages: 1 2 3 4 5 6 7 8