• This is the full error:
    Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 72 bytes) in /public_html/wp-includes/wp-db.php on line 2341

    I had to turn on xdebug to track where the memory leak was and it turned out to be iThemes Security:

    [18-Apr-2016 22:55:16 UTC] PHP 7. ITSEC_Backup->do_backup() /public_html/wp-includes/plugin.php:525
    [18-Apr-2016 22:55:16 UTC] PHP 8. ITSEC_Backup->execute_backup() /public_html/wp-content/plugins/better-wp-security/core/modules/backup/class-itsec-backup.php:99
    [18-Apr-2016 22:55:16 UTC] PHP 9. wpdb->get_results() /public_html/wp-content/plugins/better-wp-security/core/modules/backup/class-itsec-backup.php:202
    [18-Apr-2016 22:55:16 UTC] PHP 10. array_values() /public_html/wp-includes/wp-db.php:2341

    This error is happening all the time at random moments…

    We need a fix quick for this.

    Thanks
    Ron

    https://www.ads-software.com/plugins/better-wp-security/

Viewing 6 replies - 1 through 6 (of 6 total)
  • @covertformula

    Disable the Schedule Database Backups setting in the Database Backups section of the iTSec plugin Settings page.

    Or lower the database backup size so that it fits in the available memory.
    There may be logs tables from other plugins in the database that contain 10000s or 100000s of records. Clear the data from those logs table and your worries are over.

    dwinden

    Thread Starter covertformula

    (@covertformula)

    Thanks @dwinden

    That’s exactly what we did (turned off scheduled backups) and it all works now!

    But there is clearly a problem as looking at the total size of the tablets it only adds up to just over 3MB…

    So not going to be using scheduled backups using iThemes Security as they do not work and cause memory leaks as indicated by xdebug!

    Thanks

    @covertformula

    Is the Backup Full Database setting enabled ? (default disabled).

    No tables with 10000s of records in the database ?

    Instead of looking at the total size of tables it’s probably better to look at the # of records per table.

    dwinden

    Thread Starter covertformula

    (@covertformula)

    @dwinden

    No its still disabled… and if I take all of the tables the rows do not even add up to 3000 with the largest one being 958 rows.

    My initial problem is all sorted now by disablling iThemes Scheduled backups…

    The memory leak was a bit of an issue to track down to iThemes, so I do hope they take this report seriously and investigate further.

    To help iThemes further this is one of the call stacks:

    Call Stack
    # Time	Memory	Function	Location
    1 0.0003 296952	{main}( )	.../admin.php:0
    2 0.0004 313728	require_once( '/public_html/wp-load.php' )	.../admin.php:31
    3 0.0005 323944	require_once( '/public_html/wp-config.php' )	.../wp-load.php:37
    4 0.0008 426560	require_once( '/public_html/wp-settings.php' )	.../wp-config.php:83
    5 0.1723 31900464	do_action( )	.../wp-settings.php:393
    6 0.1903 33137640	call_user_func_array:{/public_html/wp-includes/plugin.php:525} ( )	.../plugin.php:525
    7 0.1903 33137888	ITSEC_Backup->do_backup( )	.../plugin.php:525
    8 0.1905 33138928	ITSEC_Backup->execute_backup( )	.../class-itsec-backup.php:99
    9 1.1578 49792552	wpdb->get_results( )	.../class-itsec-backup.php:202
    10 2.2055 536575800	array_values ( )	.../wp-db.php:2341

    @covertformula

    Ok, now you’ve got me really interested.
    That is, if you are looking at the right database (just checking) ??

    Would you be interested in assisting me trying to figure this out ?
    Or is disabling the Schedule Database Backups setting a good enough solution and you don’t really want to spend any more time on getting to the bottom of this ?

    Note I’m not an iThemes employee, just a guy in for a challenge.

    There must be something specific in your database that is causing this …

    dwinden

    Thread Starter covertformula

    (@covertformula)

    @dwinden

    Disabling the Schedule Database Backup was good enough as all backups are done via WHM and I needed this site up and running ASAP. It’s not the first time I’ve seen this either both on my own sites which all have iThemes Security installed but other WP sites as well.

    I really hope the guys over at iThemes Security look into this problem and if nothing else hope that this post will help others save a whole lot of time trying to figure out what is causing this allowed memory exhausted error!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Fatal error: Allowed memory exhausted!’ is closed to new replies.