TPC! Memory Usage for WordPress

TPC! Memory Usage Dashboard Widget

TPC! Memory Usage Dashboard Widget

TPC! Memory Usage allows WordPress administrators to view the current and peak memory usage of the application, have e-mail notifications sent when memory usage exceeds the set level, and provides a detailed system information screen. This is extremely helpful when testing new plugins, or if there are a lot of modifications, plugins, or large language files. A strategic dashboard widget will provide a snapshot which includes the following information:

  • Monitor WordPress memory usage at various points
  • Ability to add custom checkpoints (WordPress actions where memory usage is recorded)
  • Log memory usage to files/database (checkpoints, when usage exceeds threshold, both, or none)
  • Keep track of all-time highest memory usage (shows date and peak usage)
  • E-mail notifications when memory usage exceeds set level w/ number of database queries
  • Completes basic security check to help prevent attacks and malware injections
  • View current memory usage
  • View current peak memory usage
  • Dashboard widget with memory meter
  • PHP memory limit
  • WordPress memory limit (defined in wp-settings.php)
  • System information screen for monitoring server, MySQL, PHP, and WordPress statuses and settings
  • Version: 0.9.1
  • Last Release: 1/10/2014

Download Latest Version of TPC! Memory Usage from WordPress.org

128 thoughts on “TPC! Memory Usage for WordPress”

  1. Pingback: TPC! Memory Usage
  2. when I updated to the current version 0.3.1 I suddenly got a bunch of over memory limit alerts from my host which is bluehost.com. Not sure if this is due to something changed in your script or something in another plugin that I use, once I deactivate TPC! Memory Usage the alerts stop.

    1. Hi Chris,

      Are you sure that the notifications you are getting aren’t being sent by TPC! Memory Usage? Version 0.3.1 actually has notifications sent by default if the memory usage exceeds 16MB. They would be from whoever hosts your site if you don’t have your own server (usually), so that makes sense. I included an example of what they look like below. You can deactivate them or increase the memory threshold within the TPC! Memory Usage settings section.

      They look something like this…

      Subject:
      [blogname] High memory usage notification

      Message:
      WordPress memory usage exceeded xx MB
      WordPress peak memory usage: xx MB

      -Chris

  3. I like this plugin quite a bit, but wish it had the ability to show me a log of activity over time.

    Also, I have a virtual dedicated server account. It has a 256M cpu limit on memory. I’m way over that running 30 WordPress sites and trying to find the trouble makers.

    All that said, I can’t tell from the descriptions if the numbers reported with this plugin are memory used per domain, or total for my account (I think it is per domain, but I’d like to know for sure)

  4. @brettbum
    Hey brettbum,

    The activity log is something I’m actively working on. It will be included in the next major release.

    As far as the second comment… do you have thirty separate sites, or are you using WP Mu?

    Thanks,
    Chris

  5. Hey Chris,

    Awesome plugin! I got a question that maybe you can help me with. I’m running WPMU 2.8.6 on a shared host. Trying to run a script that keeps running out of memory. The host has defined a local php.ini file in the domain root upping the limit to 64M.

    Here’s the kicker. Your plugin and WordPresses internal check (via wp-settings.php) still report 32M, thus scripts still don’t run.

    However, phpinfo() reports 64M. If I run a plain php test file using the following code:

    echo ini_get(‘memory_limit’);
    echo ”;

    $memlimit = ( @ini_get(‘memory_limit’) ) ? ini_get(‘memory_limit’) : ‘N/A’;
    echo $memlimit;

    $phpvars = ini_get_all();
    echo ”; print_r($phpvars); echo ”;

    Everything reports 64M and from ini_get_all:
    [memory_limit] => Array
    (
    [global_value] => 64M
    [local_value] => 64M
    [access] => 7
    )

    I’m baffled what it is about WordPress that insists on pulling 32M, which I’m sure is the server config.

    Any thoughts?

  6. WOW! Don’t I feel like the tool. I figured it out, had to put a local php.ini the wp-admin, I forgot that’s a whole separate piece. DOH! Anyway, great app, love it.


  7. James:

    Hey Chris,

    Awesome plugin! I got a question that maybe you can help me with. I’m running WPMU 2.8.6 on a shared host. Trying to run a script that keeps running out of memory. The host has defined a local php.ini file in the domain root upping the limit to 64M.

    Here’s the kicker. Your plugin and WordPresses internal check (via wp-settings.php) still report 32M, thus scripts still don’t run.

    However, phpinfo() reports 64M. If I run a plain php test file using the following code:

    echo ini_get(’memory_limit’);
    echo ”;

    $memlimit = ( @ini_get(’memory_limit’) ) ? ini_get(’memory_limit’) : ‘N/A’;
    echo $memlimit;

    $phpvars = ini_get_all();
    echo ”; print_r($phpvars); echo ”;

    Everything reports 64M and from ini_get_all:
    [memory_limit] => Array
    (
    [global_value] => 64M
    [local_value] => 64M
    [access] => 7
    )

    I’m baffled what it is about WordPress that insists on pulling 32M, which I’m sure is the server config.

    Any thoughts?

    Thanks so much for your feedback!

    Did you add the WP_MEMORY_LIMIT constant to your wp-config.php file? As long as the php.ini file is setup correctly, this will up the WordPress internal memory limit to 64MB, and effectively bypass the 32MB limit as set in wp-settings.php.

    define(‘WP_MEMORY_LIMIT’, ’64M’);

    I hope this helps!

    -Chris

  8. I tried to install and got the following error message:

    Plugin could not be activated because it triggered a fatal error.

    Warning: require_once(tpcmem-security.php) [function.require-once]: failed to open stream: No such file or directory in /home/myhdtvch/public_html/artoftheiphone/wp-content/plugins/tpc-memory-usage/tpc_memory_usage.php on line 42


  9. Alan:

    I tried to install and got the following error message:

    Plugin could not be activated because it triggered a fatal error.

    Warning: require_once(tpcmem-security.php) [function.require-once]: failed to open stream: No such file or directory in /home/myhdtvch/public_html/artoftheiphone/wp-content/plugins/tpc-memory-usage/tpc_memory_usage.php on line 42

    Hey Alan,

    I’m so sorry about that! For whatever reason, the tpcmem-security.php file was not included when I posted version 0.5.

    I fixed the problem. Deleting the plugin, and installing again will fix the problem. I was able to test and confirm this is working now, so you should be good to go.

    Again, sorry for the inconvenience!

    -Chris

  10. Fatal error: Call to undefined function apache_get_modules() in /home/cdcr1985/public_html/blog/wp-content/plugins/tpc-memory-usage/tpcmem-security.php on line 19

    I delete and installed Again… Version 0.4 worked fine.

  11. Hi Chris,
    I currently Updated to 0.6…
    Now I get a Mass of E-Mails telling me, memory of 64 MB is exceeded by 31xxx MB … Seems it uses KB for usage in the Mailermodule… Waaah :D
    Fix it please (hat to use a mailfilter to delete that tons of mails :D)

    1. Hi Felix,

      I’m so sorry about this. I fixed this bug as soon as I found out (@see version 0.6.1). I hope it didn’t cause you too much trouble. Again my apologies! Look for the first major release (1.0) soon… I’ve added a few big features that will definitely help everyone out. Happy New Year!

      -Chris

  12. New problem, the plug-in sent me 1000+ mails with this message:

    WordPress memory usage exceeded 64 MB
    WordPress peak memory usage: 26295064 MB

    26295064Mb or similar it’s to weird. last night I updated the plug-in from 0.5.1 to 0.6 and gives this problem.

  13. I am happy the bug was fixed, I had the same problem above, as a result, my host suspended my account for exceeding CPU quota. I was not easy to convince to re-activate my website. After checking around I realized the plugin was the source of the problem. Now I am worried about updating to v 7. Else, very useful tool so far

    1. Hi Justin,

      The high CPU usage must be caused by another plugin. This plugin uses VERY little CPU/memory; otherwise, it would defeat the entire purpose. I have this plugin running on several high traffic web sites with not a single problem. I’ve done testing to ensure there are no problems in this arena and this is still the case.

      In version 7, you can add custom checkpoints to measure the memory usage at any point within the script where there is a WordPress action. This should help you to better diagnose the problem.

      - Are you using shared hosting?
      - What other plugins do you have activated? Any language files?

      -Chris

  14. The only change I made was updating the TCP! plugin (I use a shared account, no issue so far x 2 years), Then few minutes after that I noticed my website was suspended. Then I checked my email when I got home and I had 100′s if not 1000′s of emails telling about exceeding my memory limit. I tried deactivating different plugins without a change, kept receiving emails every-time I refresh a page (there was a mention of ‘shutdown’ or sth like that can’t remember (I placed my site was on maintenance mode after my account was reactivated), then noticed that there was another update of the plugin few hours later and I installed it. After that everything went back to normal until now. Except for the 2nd update that day, I did not need to make any other change for it to stop. My website has been with that hosting service for about 2 years now without major issue and I use a very limited number of plugins and no widget thanks to my very functional theme. Else the plugin is absolutely great and I am still using it. Was just a weird coincidence between updating it (from work, which I will never do anymore) and the sudden firing of TCP! emails from WP.

  15. I know you already know this, but I want to readdress something… the high memory usage e-mail notification is a feature of the plugin; however, there was a bug in 0.6 (fixed in 0.6.1) that caused e-mails to be sent out each time the page was loaded (it was using comparing bytes instead of megabytes).

    I had a problem with cPanel once that caused my hosting service to shut off my account (after explaining what happened it was quickly restored), and e-mail is most likely the reason that your hosting company had a problem. You can adjust the memory usage threshold or turn off the e-mails in settings. Once again, my apologies that the mass e-mails caused you to have issues.

    As for the CPU usage… the CPU/memory usage of this plugin is extremely low. That much I promise you!

    -Chris

  16. I fully agree. I cannot run my website without that plugin and I can only recommend it. I already upgraded to the latest version earlier today and I have no problem with it. It has helped me a lot to identify demanding plugins and to limit my website to essential ones. The first thing I check after I log in or after installing a new plugin or even after performing an update is the memory usage displayed.

  17. Hi Chris,

    Could you please explain what the difference between Usage Sample, Peak Usage, and All-Time is? I think Usage Sample is the current use. I don’t understand what’s different between Peak and All-Time although there clearly is some sort of difference because I have two different values, and it obviously wouldn’t be there if it was the same. :)

    Thanks for a great plugin!


  18. Brian:

    Hi Chris,

    Could you please explain what the difference between Usage Sample, Peak Usage, and All-Time is? I think Usage Sample is the current use. I don’t understand what’s different between Peak and All-Time although there clearly is some sort of difference because I have two different values, and it obviously wouldn’t be there if it was the same. :)

    Thanks for a great plugin!

    Of course! I’ve outlined them below for you:

    Usage Sample – the current memory usage when the dashboard/comment is displayed
    Peak Usage – the peak memory usage as reported by PHP for the current script
    All-Time – the peak memory usage as defined by checkpoints since plugin was activated or last stats reset

    I hope this answers your questions. Thank you for the kind words and support!

    -Chris

  19. Hey cdcr1985,

    Thanks for reporting this. I found the bug… WordPress changes the runtime value of ‘memory_limit’ so when we used ini_get(‘memory_limit’), it wasn’t pulling the original php.ini configuration value. The PHP memory limit is now pulled from the php.ini directive instead of the runtime variable. This fix is as of version 0.7.2.

    Thanks again, cdcr1985! You’ve been extremely helpful in finding some of these issues.

    -Chris

  20. Chris

    I am having the same problem as cdcr1985. my dashboard shows 24M for PHP Memory Limit when i have my htaccess file set to 128M. This was working fine up till the last couple of updates. i update all plugins immediatetly upon release and am running 0.8

  21. Hey, nice plugin. I do seem to have a couple issues however.

    1) When I create an info.php and check, it says my memory limit is 64mb and that magic quotes is off, your plugin only reports 32mb and magic quotes as on.

    2) My blog error_log has around 30 of this entry in it since I installed the plugin last night:

    [06-Jan-2010 21:24:59] PHP Warning: Missing argument 1 for __lambda_func() in /home/jakets/public_html/blog/wp-content/plugins/tpc-memory-usage/tpcmem-checkpoints.php(133) : runtime-created function on line 1

    My php version is: 5.2.11
    Wp Version is: 2.9.1

    Thanks!


  22. Jake:

    Hey, nice plugin. I do seem to have a couple issues however.

    1) When I create an info.php and check, it says my memory limit is 64mb and that magic quotes is off, your plugin only reports 32mb and magic quotes as on.

    I am unable to recreate this so far, but I would be able to learn more if I could see the code you are using in info.php.

    2) My blog error_log has around 30 of this entry in it since I installed the plugin last night:

    [06-Jan-2010 21:24:59] PHP Warning: Missing argument 1 for __lambda_func() in /home/jakets/public_html/blog/wp-content/plugins/tpc-memory-usage/tpcmem-checkpoints.php(133) : runtime-created function on line 1

    I’m believe I found out why this was happening. It should be fixed in 0.8.1, which I’m working on putting together now.

    My php version is: 5.2.11
    Wp Version is: 2.9.1

    Thanks!

    Thanks for the feedback! Responses are in red above.

    -Chris

  23. I tried your latest 1.8.1 Version and this is still reporting values incorrectly. I have raised my memory limit to 128M and it is still showing 32M.


  24. Jake:

    I tried your latest 1.8.1 Version and this is still reporting values incorrectly. I have raised my memory limit to 128M and it is still showing 32M.

    Hi Jake,

    I’ve tried several different development environments including CentOS, Ubuntu, and Windows 7… all with Apache 2.2.13/.14. I’ve tried PHP 5.2.11, 5.3.0, and 5.3.1. I can’t seem to replicate this issue. If you want to contact me via e-mail about this, I’d be happy to try to delve into your situation more.

    Have you tried restarting your server? Keep in mind this pulls the PHP memory limit from the global php.ini file. That means it won’t be affected by changes after that (runtime, .htaccess, etc.).

    I hope this helps a little.

    -Chris

  25. I couldent find a way to contact you by email, but here is the chat I had with my host:

    Denis T [10:23:35 PM]: Welcome to our real-time support chat. How can I help you today?
    Jake [10:23:35 PM]: I’m trying to get a plugin to read some values correctly. If you read the last few comments here you can see whats going on. Is it possible to do what he suggests? http://webjawns.com/tpc-memory-usage-for-wordpress/comment-page-1/#comment-1167

    My site is http://farmvillefanatic.com
    Denis T [10:24:26 PM]: I don’t see any suggestion there
    [10:24:35 PM]: What exactly should be changed/installed?
    [10:25:01 PM]: You mean memory limit ?
    Jake [10:25:54 PM]: the last comment hold on
    [10:26:06 PM]: Have you tried restarting your server? Keep in mind this pulls the PHP memory limit from the global php.ini file. That means it won’t be affected by changes after that (runtime, .htaccess, etc.).
    [10:26:28 PM]: basically i changed some info, i have set my memory limit from 32mb to 128
    [10:26:33 PM]: and its not being reflected at all
    [10:26:40 PM]: as well as turning magic quotes off
    [10:26:48 PM]: but it is saying those are on as well
    [10:27:19 PM]: http://farmvillefanatic.com/info.php
    [10:27:28 PM]: the values are reflected there
    [10:27:40 PM]: it says magic quotes are off, but my software isnt saying that
    [10:27:46 PM]: is this the global php,ini?
    Denis T [10:28:37 PM]: This is your php.ini. Global PHP ini affects all sites on server.
    Jake [10:29:05 PM]: so changing my memory limit is meaningless? considering its set in the global?
    [10:29:10 PM]: as well as turning of magic quotes?
    Denis T [10:29:31 PM]: You can see “Master Value” – server php ini and local value – your php.ini
    Jake [10:30:08 PM]: i dont understand what that means exactly, but am i actually doing the things i put in my php.ini or not?
    [10:30:19 PM]: basically is magic quotes on or off sitewide?
    Denis T [10:30:35 PM]: off as I can see, and memory limit is 128M
    Jake [10:30:40 PM]: my php.ini is reflecting that it is, but the software im using (wordpress) is saying it isnt
    [10:31:02 PM]: so i dont really understand what the point is in changing it if the software is all just pointing to the global one
    Denis T [10:31:26 PM]: Your application is using your local one, not global.
    Jake [10:31:55 PM]: ok i guess, thanks.

  26. Great plugin! However, I’ve encountered a bug since upgrading to 0.8.0 (had previously been on 0.6.something I think) and still having the same issue on 0.8.1 – TPC is computing my memory usage percentage based on the PHP memory limit (16M) and not the WordPress memory limit (32M). Since WordPress dynamically changes the memory limit to the value it’s configured to use, my 25MB memory usage should be reported as 78%, not the 157% it’s showing as.

  27. Hi Chris,
    Really great plugin. I am about to develop similar tool but yours really do the job! Well done & Thanks!
    2 small feedback as my contribution:
    1. ability to “reset” all time peak could be useful feature
    2. detection of apache module (mod_security) could be misleading as the signature not always “mod_security” or “mod_security2″. I sent one of my non-geek friend in a bit of panic mode as your plugin indicates no mod_security but it’s actually has different signature of “security2_module” – perhaps a warning that the host could alter the name and user should check with their host will be more useful for non-technical user.

    But, well done – I’ll create a massive article based on your tools ! Watch out your traceback !


  28. Kromey:

    Great plugin! However, I’ve encountered a bug since upgrading to 0.8.0 (had previously been on 0.6.something I think) and still having the same issue on 0.8.1 – TPC is computing my memory usage percentage based on the PHP memory limit (16M) and not the WordPress memory limit (32M). Since WordPress dynamically changes the memory limit to the value it’s configured to use, my 25MB memory usage should be reported as 78%, not the 157% it’s showing as.

    Hey Kromey,

    Thanks for the feedback. I’m fixing this and it will be in the next release. Great catch!

    -Chris


  29. Denis Kristanda:

    Hi Chris,
    Really great plugin. I am about to develop similar tool but yours really do the job! Well done & Thanks!
    2 small feedback as my contribution:
    1. ability to “reset” all time peak could be useful feature
    2. detection of apache module (mod_security) could be misleading as the signature not always “mod_security” or “mod_security2″. I sent one of my non-geek friend in a bit of panic mode as your plugin indicates no mod_security but it’s actually has different signature of “security2_module” – perhaps a warning that the host could alter the name and user should check with their host will be more useful for non-technical user.

    But, well done – I’ll create a massive article based on your tools ! Watch out your traceback !

    Hi Denis,

    1. You’ll be happy to know that this feature is available already. You can find it on the Settings page.

    2. Thanks so much for pointing this out. I’m going to come up with a statement to this effect for the next release.

    …and last, but not least, thank you for your support. I look forward to reading the article!

    Thanks to everyone who has helped out with this!

    -Chris

  30. Hi there,
    Nice plugin, thank you for making it available!

    A question: is it meant to send out notifications every 5 seconds when the memory usage exceeds the threshold? Isn’t just one notification sufficient? :) Or once every 10 minutes or so?

  31. hi there! this seems to be a great plugin, but i have a question…

    i have a shared server with a bunch of wordpress instalations, and i usualy get 500 internal server errors…

    i know i’m having memory issues, but i can’t seem to be able to find out the cause…

    does this plugin would allow me to identify it? or is just a way of monitoring overall memory usage?

    thanks


  32. Marko:

    Hi there,
    Nice plugin, thank you for making it available!

    A question: is it meant to send out notifications every 5 seconds when the memory usage exceeds the threshold? Isn’t just one notification sufficient? :) Or once every 10 minutes or so?

    Hi Marko,

    Currently, the plugin sends out a high usage notification anytime the usage exceeds the threshold. This can happen multiple times in a single request if Ajax requests also exceed the threshold. This is something I’ve thought about, and in the future we will add a few features that will allow administrators to have more control over when e-mails are sent. For the time being, I would suggest raising the threshold to a higher level.

    Thanks for your support!

    -Chris


  33. det:

    hi there! this seems to be a great plugin, but i have a question…

    i have a shared server with a bunch of wordpress instalations, and i usualy get 500 internal server errors…

    i know i’m having memory issues, but i can’t seem to be able to find out the cause…

    does this plugin would allow me to identify it? or is just a way of monitoring overall memory usage?

    thanks

    Hi det,

    Yes! This plugin can help pinpoint exactly where memory usage is at its peak. I plan on writing a guide on how to best use this plugin eventually, but here’s a few pointers to hold you over until then.

    1. Look for WordPress actions within the plugin files, and write them down. It may look like this… do_action(‘delete_post’). TPC! Memory Usage will log memory usage at each of those checkpoints. By measuring the difference in usage between different checkpoints, you can find out where your problem areas are.
    2. Add all those actions as checkpoints within the WordPress administration panel. (Memory Usage > Add Checkpoint)
    3. Turn on file logging, and set the log level to ‘always’ or ‘checkpoints_only’.
    4. Visit some of the sections on your blog – tags, search, index, etc. All data will be recorded within /wp-content/plugins/tpc-memory-usage/logs/tpcmem.log, which can be viewed within any text editor.
    5. Turn off file logging when done. (You should avoid file-based logging on production sites, as it can slow things down a little. If it’s a low traffic site, you may not see much of a difference. YMMV)

    I hope this helps!

    -Chris

  34. Hi,

    Thanks for making this plugin. When ever I try to activate it, I see this error:

    Parse error: parse error, unexpected T_ARRAY, expecting ‘)’ in /chroot/home/anaconda/hiddenanime.com/html/forums/word/wp-content/plugins/tpc-memory-usage/tpcmem-checkpoints.php on line 206

    Any idea what I should do? I have the latest version installed – (.9).

    Thanks in advance


  35. James:

    Hi,

    Thanks for making this plugin. When ever I try to activate it, I see this error:

    Parse error: parse error, unexpected T_ARRAY, expecting ‘)’ in /chroot/home/anaconda/hiddenanime.com/html/forums/word/wp-content/plugins/tpc-memory-usage/tpcmem-checkpoints.php on line 206

    Any idea what I should do? I have the latest version installed – (.9).

    Thanks in advance

    Hey James,

    My educated guess is that you are using a PHP version less than 5.1. This application uses array type hinting at that exact point, which isn’t available until PHP 5.1+. Can you check and get back to me? If that’s not it, we’ll take a look again.

    Thanks!

    -Chris

  36. Chris,

    You are right! I checked with my host and they only have 4.3.11 of PHP installed.

    Is all hope lost for me?

    Your plugin is really well rounded, but I am really looking for the cpu stats and memory stats. If there is no way around it, is there something I can do with my 4.3.11 that would allow me to view those two items?

    Thanks in advance


  37. James:

    Chris,

    You are right! I checked with my host and they only have 4.3.11 of PHP installed.

    Is all hope lost for me?

    Your plugin is really well rounded, but I am really looking for the cpu stats and memory stats. If there is no way around it, is there something I can do with my 4.3.11 that would allow me to view those two items?

    Thanks in advance

    Hi James,

    Unfortunately, your best bet is to update to PHP5. PHP4 is losing support rapidly, not to mention it is lacking in MANY features. I think v0.5.1 should work for you, but it lacks most of the new features (see changelog).

    Is there anyway you can get your provider to upgrade to PHP5? If not, you can always switch to a new provider (many offer BOTH PHP4/5).

    I hope this helps!

    -Chris

  38. Looks like a great plugin. However, once I install it my DashBoard will no longer display all the screen options? Plugin looks like it works fine. Hosted on blue host with WP 2.9.1. Intested in your thoughts.

  39. slow in response, wasn’t subscribed to the comment thread or something. :)

    I’ve got 30 separate wp installations on a shared server.

    Back when I made the comment, I was getting slightly (very slightly) different results from site to site. But these days with the latest version, I’m seeing the same exact numbers, which makes me think I’m getting a server level number.

    not good or bad, just important to understand.

    So overall that leaves me with two things in my wish list, which maybe this plugin can some day cover and maybe not.

    1. Would love to see an option to share information back to you or to some service where we could start to see some performance stats on many different hosts, configurations, systems etc. which might help people better benchmark what is a good server or php configuration etc.

    2. Would love to see some details that might help me understand something along the lines of active services (like how much a plugin is running up the system so that I could trouble shoot bad or resource heavy plugins). Not something I need all the time, thank god, but in a pinch, sure would help.

    3. Where’s your donate button? I can afford to pay for development, but can definitely tip (hopefully along with lots of other people to help fuel your fire!)

    1. Brett,

      I absolutely LOVE your ideas. I might want to talk with you about this more once I start delving into the next version, if you’d be open to that. Great feedback.

      (As for donate button: Settings page, upper-right corner)

      Thanks!
      Chris

  40. Hi Chris,
    I liked this plugin and I really have very limited memory so I have to keep an eye on the usage. After installing the plugin the Admin panel direction changed from RTL ( Arabic ) to LTR, font changed from Tahoma to the default English font which isn’t suitable for Arabic scripts, And the appearance damaged a lot, I can contribute and Translate the po file but please change it to RTL and solve everything If possible .

  41. Thank you for this really nice plugin. But I have a problem with the e-mail notification: I’m running WordPress with a 40M memory_limit but the plugin sends me an e-mail, everytime wordpress uses more than 32M

    I changed the value in tcp-memcore.php on line 102 to 40 but that won’t solve my case.

  42. Thanks for the plugin,
    In the “setting” area, in “Notifications” tab, i set the mail of server admin in the “Recipients” field to Notify him if memory usage exceeds, but he don’t receive any notification, but me the “admin” of the webiste YES.
    pls how can i notify the admin about the exceed of memory?
    Thanks

  43. I installed the plugins. I get emails whenever memory usage is exceeds 16M. It comes in pulses. But how do I figure out what’s causing the memory usage so I can fix it?

    I’m not getting any reports. I chose “wrote to log when memory exceeds 16 M”. I chose “file”. Where are the logs? Should I check database?

  44. Hi,

    Nice plugin !

    I added define(‘WP_MEMORY_LIMIT’, ’64M’); to my wp-config.php , but In the Dashboard I get :
    WP Memory Limit: 32M
    PHP Memory Limit: 64M

    Also, what do the Load Averages: 1.03 1.97 2.5 actually mean ?

    Regards,

    D.

  45. I have having the same issues as many people who have commented here. I’d like to know exactly what is causing the issue and cant find answers on the net about this. This plugin doesn’t look like it can tell me which plugin is taking up so much memory or bring my server down.

    1. Hey Winter,

      You can figure out how much memory a specific plugin is using by adding new actions/hooks. If the plugin doesn’t have any actions, you can add some at the various points where you want to make measurements.

      Thanks,
      Chris

  46. Under System Overview/Security, I had several Warnings! and Problem! messages.

    Where do I go to correct these?

    I have looked everywhere for months for the answer to my memory overage problem. This is the first site that effectively addresses the problem. You’re on to something here, keep at it!

  47. Great Plugin!!
    I have a problem actually, I have a hosted website in 1and1.
    I believe the memory limit is 40 and that is what your plugin says. I have set a WP limit of 64M.
    However, the System Overview graph and the percentage are made of a 256M scale so I have a little percentage (27,17MB -11%- with 15 plugins by the way).
    How can I change the 256M scale to 40M??
    Thanks!

  48. I have two WordPress 3.0.5 blogs with two different hosting companies. I set them up so that each has the same plug-ins installed: Akismet and TPC! Memory Usage, and both to use the WordPress “default” theme based on Kubrik.

    When I display the dashboard for one, TPC! says the peak memory is 22MB and the other one says 15 MB.

    So is this a real result or some kind of a quirk with how PHP tracks memory usage? (The small usage site is PHP 5.2.14 and the other 5.2.15.) If it’s real, which number is out of line?

    Thanks for the totally useful plug-in.

    1. This could happen for a variety of reasons. You are correct that the version difference can certainly make a difference, but granted you are using two different hosting companies, it is likely that they also have different PHP configurations. Even with dedicated (or virtual dedicated) hosting environments, you’ll find subtle differences. There could even be differences between operating system versions. As far as PHP versioning is concerned, see the release logs for potential performance changes:

      http://php.net/releases/5_2_14.php
      http://php.net/releases/5_2_15.php

      I hope this helps!

      -Chris

  49. I am using your great plugin to troubleshoot DreamHost Server side cuts because of memory hogs. Somehow your plugin seems to send quite a few reports to the site admin’s e-mail address. I do not really need that. How can that be turned off?

  50. I’ve changed my PHP and WordPress memory limit to 128M, but still when my memory usage goes over the old standard of 32MB I get a notification of shutdown. What’s this mean?

    Usage Sample: 24.67MB (10%)
    Peak Usage: 24.85MB (10%)
    All-Time: 35.26MB on 5/4/11 @ 4:14 am (shutdown)
    Load Averages: 1.74 1.36 1.42
    WP Memory Limit: 128M
    PHP Memory Limit: 128M

  51. Hi, We have been getting regular internal server errors until I bumped memory to 128mg but still see load averages from 2 to 4 on this server. My question is: What does the shutdown mean?

    Usage Sample: 40.22MB (31%)
    Peak Usage: 40.34MB (32%)
    All-Time: 44.75MB on 5/29/11 @ 1:13 am (shutdown)
    Load Averages: 3.05 2.97 2.98
    WP Memory Limit: 128M
    PHP Memory Limit: 128M

    We have a few plugins installed but not so many as should be a problem. We’re on a cloud server, and I just wonder if there is enough power allocated to our hosting…
    Jeff

  52. Hi

    I like your plugin, but I am running into some problems, I do not know if it is the TPC plugin or not, but when I disable TPC, then the error goes away.

    I get this error message when activating the plugin Backup to Dropbox, when TPC is also active:
    Warning: require_once(Tpcmem/Log.php): failed to open stream: No such file or directory in /www/wp-content/plugins/tpc-memory-usage/tpcmem-core.php on line 26 Fatal error: require_once(): Failed opening required ‘Tpcmem/Log.php’ (include_path=’/www/wp-content/plugins/wordpress-backup-to-dropbox/PEAR_Includes:.:/usr/local/lib/php’) in /www/wp-content/plugins/tpc-memory-usage/tpcmem-core.php on line 26

    When I deactivate TPC then I can activate Backup to Dropbox with out any problems.

    Can you help me? Thanks

  53. Hi chris,

    GREAT plugin.

    Still works fine in WP 3.2 but wanted to let you know that the progress bar doesn’t show the actual amount it is filled up anymore. It gives the % but doesn’t fill with colour. probably just a CSS thing in WP 3.2.

    Let me know if you see this too?

    Ross :)

  54. I have changed my php.ini file and the memory data does not change as well as the security check is not reading the changes.

    Thank you kindly for your support and plugin.


  55. enostrum:

    Great Plugin!!
    I have a problem actually, I have a hosted website in 1and1.
    I believe the memory limit is 40 and that is what your plugin says. I have set a WP limit of 64M.
    However, the System Overview graph and the percentage are made of a 256M scale so I have a little percentage (27,17MB -11%- with 15 plugins by the way).
    How can I change the 256M scale to 40M??
    Thanks!

    Change the php.ini file.

  56. Hi Chris,

    Thanks for creating this plugin. I’m a bit confused as to what I’m seeing reported, however. It says I’m using 20M of my 32M available, yet it says this is 9%, which it clearly isn’t. I tried messing with the numbers by adjusting my php.ini and wp-config files, and it seems that no matter what I change, it always says 9%. I’m also not seeing anything in the Reports section (“Sorry, we did not find any records”, no matter where I look). I’m running WP v3.1.4.

  57. Can I add to the feature request? Allow for specific plugin memory utilization.

    What would be cool is a graph showing total memory used and how it breaks down by core wordpress and specific plugins.

    If this can be done via “Adding new actions/hooks” then some additional documentation/explanation regarding this would be useful.

    Thanks

  58. This is one great plugin. Wow. Thank you!

    I don’t understand the full ramifications of every warning and notification, but the plugin makes transparent critical data that I never had access to before so easily and conveniently. And it is all logged.

    I love this plugin. LOVE. Thank you.

  59. FYI – Since the latest update, your plugin causes a 500 error on all of my wordpress sites in a multisite install, at least when activated at the network level.

  60. Hi,

    Am trying to track down the culprit for high-memory usage on a client website and am making use of your most excellent plugin to do it.

    There is a previous comment where you say:

    “You can figure out how much memory a specific plugin is using by adding new actions/hooks. If the plugin doesn’t have any actions, you can add some at the various points where you want to make measurements”

    Can you direct me to some instructions for how to do this? I am not sure what adding checkpoints means, or how to add them for specific plugins.

    Any and all help greatly appreciated, thanks!

    John

  61. Hi Hi,

    it is a very useful plugin, but the way you include your javascript and css files causes a notice in debug-mode: “Notice: wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or init hooks… (This message was added in version 3.3.)..”. When i changed it to:

    function tpcmem_load_js_and_css() {
    wp_register_script(‘tpcmem’, plugins_url(‘tpc-memory-usage/js/tpcmem.js’), array(‘jquery’), TPCMEM_VERSION, true);
    wp_enqueue_script( ‘tpcmem’ );
    wp_register_script(‘tpcmem-overview’, plugins_url(‘tpc-memory-usage/js/overview.js’), array(‘jquery-ui-tabs’), TPCMEM_VERSION, true);
    wp_enqueue_script ( ‘tpcmem-overview’ );
    wp_register_script(‘tpcmem-tablesorter’, plugins_url(‘tpc-memory-usage/js/jquery.tablesorter.min.js’), array(‘jquery’), ’2.0.3′, true);
    wp_enqueue_script(‘tpcmem-tablesorter’);
    wp_register_script(‘tpcmem-reports’, plugins_url(‘tpc-memory-usage/js/reports.js’), array(‘tpcmem-tablesorter’), TPCMEM_VERSION, true);
    wp_enqueue_script(‘tpcmem-reports’);
    wp_register_style(‘tpcmem’, plugins_url(‘tpc-memory-usage/css/tpcmem.css’), array(), TPCMEM_VERSION);
    wp_enqueue_style( ‘tpcmem’);
    }

    add_action(‘admin_enqueue_scripts’, ‘tpcmem_load_js_and_css’);

    all works fine. Maybe a little suggestion for the next release?

    Daniel

  62. I have solved the missing styles on bar graph, you need to edit tpcmem-template.php and replace background-color with background on the line:

    <div class=”widget” id=”tpcmem_pbar” style=”width: %; background-color: ;”>

  63. In the absence of input from our intrepid author, I went ahead and made a few minor changes so that the plugin is fully compliant with WordPress 3.8.

    http://dev.imperativeideas.com/plugins/tpc-memory-usage.zip

    I’d love to see what you had in mind for updates, even if they are unfinished.

    Changes:

    library/Tpcmem/Log.php
    + 214: made getInstance() a static function

    tpcmem.css
    + 7: floated progress bar to the left
    + Corrected all relative image paths

    tpcmem-admin.php
    + 31-52: removed script enqueue logic

    tcpmem.php
    + Added script registration and enqueue to the admin_enqueue_scripts hook
    + Retained old conditional logic
    + Moved enqueue logic so that it sits next to the regitration
    + Wrapped script registration into a function.
    + Added a default condition when $_GET['page'] is not set

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>