Title: PHP memory error when viewing Stats
Last modified: December 6, 2022

---

# PHP memory error when viewing Stats

 *  [imkimc](https://wordpress.org/support/users/imkimc/)
 * (@imkimc)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/php-memory-error-when-viewing-stats/)
 * We’ve installed the plugin and the voting system seems to work but when you try
   to access the Stats page in the admin pane you get a “critical wordpress error”.
 * Looking at the logfiles you see this:
 *     ```
       PHP Fatal error: Allowed memory size of 805306368 bytes exhausted (tried to allocate 20480 bytes)
       URL	http://www.rvtravel.com/wp-admin/admin.php?page=rate-my-post-stats 
   
       PHP Fatal error:  Allowed memory size of 805306368 bytes exhausted (tried to allocate 20480 bytes) in /www/wp-includes/class-wpdb.php on line 2879
       ```
   
 * Our DB is large with over 16,000 posts… have we hit a limitation of some sort
   in the plugin? I tried the plugin on some additional test sites (very little 
   content) and it worked just fine. In additional troubvleshooting steps I moved
   it to our test site and disabled all plugins save yours and even tried different
   themes and removed an y custom CSS or JS scripts that we had loaded, still gave
   the same error.
 * Thanks,
    Kim`
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fphp-memory-error-when-viewing-stats%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Support [Blaz K.](https://wordpress.org/support/users/blazk/)
 * (@blazk)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/php-memory-error-when-viewing-stats/#post-16269291)
 * Hi Kim,
 * Thanks for reporting this issue. Are you using the latest version of the plugin(
   3.3.8)? In the last update the query for retrieving stat rows has been optimized.
   How many rated posts does the website have altogether? What’s the memory limit
   on the server?
 * I’ll test and see if I can reproduce the issue.
 * Regards,
    Blaz
 *  Thread Starter [imkimc](https://wordpress.org/support/users/imkimc/)
 * (@imkimc)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/php-memory-error-when-viewing-stats/#post-16269887)
 * Hi Blaz,
 * Yes it’s the latest version 3.3.8.
 * Memory on the server is 768mb.
 * We’ve just started using this plugin so we only have 100 rated posts.
 * Thanks,
    Kim
 *  Plugin Support [Blaz K.](https://wordpress.org/support/users/blazk/)
 * (@blazk)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/php-memory-error-when-viewing-stats/#post-16300343)
 * Hi [@imkimc](https://wordpress.org/support/users/imkimc/),
 * Sorry for my late reply. It took me a while to create dev environment with many
   rated posts.
 * I ran some tests and even with over 200 rated posts didn’t encounter any issues.
   Memory limit set to 128mb, so much less than what you’re using. I also checked
   the query again and it’s written so that it only returns post IDs. Therefore,
   it shouldn’t cause issues in such scenarios.
 * Could it be some other server config interfering?
 * Best regards,
   Blaz

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘PHP memory error when viewing Stats’ is closed to new replies.

 * ![](https://ps.w.org/rate-my-post/assets/icon-128x128.png?rev=2045796)
 * [Rate My Post - Star Rating Plugin by FeedbackWP](https://wordpress.org/plugins/rate-my-post/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/rate-my-post/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/rate-my-post/)
 * [Active Topics](https://wordpress.org/support/plugin/rate-my-post/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/rate-my-post/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/rate-my-post/reviews/)

## Tags

 * [php-error](https://wordpress.org/support/topic-tag/php-error/)
 * [Stats](https://wordpress.org/support/topic-tag/stats/)

 * 3 replies
 * 2 participants
 * Last reply from: [Blaz K.](https://wordpress.org/support/users/blazk/)
 * Last activity: [3 years, 4 months ago](https://wordpress.org/support/topic/php-memory-error-when-viewing-stats/#post-16300343)
 * Status: not resolved