How do you know there is a big memory usage difference between the two types of users? It’s possible the difference between the two is minimal, and your base memory usage was very close to the 256MB limit. For example, the autologin/session meta data can get unwieldy and could easily consume 2-3MB on its own. (It’s extremely inefficient to have that data in _usermeta
and not in its own table, but I digress.)
Thread Starter
srhog
(@srhog)
Thanks for responding Dion.
Well, I’m not very savvy when it comes to DB problems so my questions will probably seem obvious or kinda stupid.
- How much can be the difference in memory usage between two profiles?
- Is the memory usage tied to the quantity of posts created by the user?
-
What other factors can contribute to the memory usage difference between profiles?
- Is there a way I can measure the memory usage of a profile?
- Do you have any suggestions on how may I fix this problem?
- Is it OK just to leave the memory usage limit at 512MB?
- Should I seek professional help from a WP/DB expert?
Again, thanks for your response.
The easy questions are the last three…you solved the problem by allowing PHP to use 512K memory, so you don’t need any professional help.
You can measure memory usage without having an effect on your site by using the following: https://wordpress.org/plugins/usagedd/
I hesitate to mention my own work, but in this case, the above plugin provides the exact information you requested without causing additional server load. (URL is intentionally in a code block so it won’t get indexed as a link.)
Your first three questions are much more difficult to answer because so many things come into play when viewing various frontend and backend pages. In general, memory usage is correlated with the amount of metadata stored for each user and post, and the total amount of metadata in the _usermeta
and _postmeta
tables.
Thread Starter
srhog
(@srhog)
Tried the plugin using both profiles and there isn’t much difference in the memory usage (max memory usage marks as 80M) so something else must be causing the error.
I’ll leave it at 512MB as a temporary solution and see if I get the same error on a clean hosting. Who knows, maybe the problem is that we’re working on a VPS hosting account that holds a lot of on going projects and the site is kind of demanding (Guess I should have mention that before huh?).
I’ll keep you guys posted.
Thanks again Dion!