Memory exhaustion calling get_users()
-
A part of the code of this plugin calls get_users() without any parameters. This loads ALL users of the site into memory and causes memory exhaustion for sites that have sufficient users. I have about 6,000 user entries in my wp_users table.
I found this out when I upgraded to version 7.12 from version 5.1.2. As soon as I upgraded the plugin, my site became inaccessible with the white screen of death. The Apache error log had entries that looked like this:
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /var/www/html/wp-includes/class-wpdb.php on line 2315.After debugging the issue, I tracked it down to this plugin’s call to get_users() in the function
lps_auto_disable_expired_accessinloginPageStylerTemp.php.Please do not call get_users() and instead use a more memory efficient way to achieve the same results.
The topic ‘Memory exhaustion calling get_users()’ is closed to new replies.