PHP Fatal error: Allowed memory size … in wp.db
-
wp.db get memory error, this is apache log
[Fri Aug 05 15:36:02.970088 2016] [:error] [pid 988] [client 151.57.27.232:18305] PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 72 bytes) in
/var/www/vhosts/www.site.com/httpdocs/wp/wp-includes/wp-db.php on line 2349Stack trace is
/var/www/vhosts/www.site.com/httpdocs/wp/wp-content/plugins/better-wp-security/core/modules/backup/class-itsec-backup.php(140): wpdb->get_results(\’SELECT * FROM `…\’, \’ARRAY_N\’)
#1 /var/www/vhosts/www.site.com/httpdocs/wp/wp-content/plugins/better-wp-security/core/modules/backup/class-itsec-backup.php(80): ITSEC_Backup->execute_backup(false)
#2 [internal function]: ITSEC_Backup->do_backup()
#3 /var/www/vhosts/www.site.com/httpdocs/wp/wp-includes/plugin.php(525): call_user_func_array(Array, Array)
#4 /var/www/vhosts/www.site.com/httpdocs/wp/wp-settings.php(393): do_action(\’init\’)
#5 /var/www/vhosts/www.site.com/httpdocs/wp/wp-config.php(106): require_once(\’/var/www/vhosts…\’)
#6 /var/www/vhosts/www.site.com/httpdocs/wp/wp-load.php(37): require_once(\’/var/www/vhosts…\’)
#7 /var/www/vhosts/www.site.com/httpdocs/wp/wp-blog-header.php(13): require_once(\’/var/www/vhosts…\’)
#8 /var/www/vhosts/www.site.com/httpdocs/index.php(21): require(\’/var/www/vhosts…\’)File class-itsec-backup.php line 140 is calling a “SELECT * FROM wp_postmeta” without any LIMIT.
Our wp_postmeta is more than 126.000 rows and if you try to put all the records in memory it crashes (we already have 256MB memory limit).
The topic ‘PHP Fatal error: Allowed memory size … in wp.db’ is closed to new replies.