• Resolved Gizant

    (@gizant)


    I have a site crashing (“There has been a critical error on your site” ), and also been seeing 500 errors.

    The error that seems to be indicating what the cause is, shows in the debug.log like the following:

    PHP Fatal error:  Out of memory (allocated 1227821056 bytes) (tried to allocate 671088640 bytes) in /home/mysite/public_html/wp-content/plugins/event-tickets/common/src/Tribe/PUE/Notices.php on line 98

    I increased the memory via wp-config.php as much as I can, but to require more than a gigabyte or 600MB off of this code, seems like perhaps a bug. No?

    • This topic was modified 3 months ago by Gizant.
Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support Darian

    (@d0153)

    Hi @gizant

    Thank you for reaching out. I understand how frustrating it can be when things don’t work as expected.

    Please don’t worry- we are already aware of the problem, and our development team is diligently working on a solution to get it fixed as soon as possible.

    Your case has been added to our internal ticket,  and we will keep you updated on the progress.

    Please don’t hesitate to reach out if you have any more questions or concerns.

    flairfront

    (@flairfront)

    A quick fix, i just commented out the line 98 in the notice.php file mentioned in the error. As far as I can see the line just aggregates notices to display re the plugin ( prob updates etc) I will keep mine disabled until there is a fix

    Plugin Support Darian

    (@d0153)

    Hi @gizant

    As a temporary workaround, you can do the following:

    Step 1: Remove the Corrupted Option

    The first step is to clean the corrupted option from your database. You can do this in one of two ways:

    1. If Your Site is Accessible:
      Add the following snippet to your site and load it once to clean the corrupted option:
      add_action( 'init', fn() => delete_option( 'tribe_pue_key_notices' ), 1 );
    2. If Your Site is Inaccessible:
      Run the following SQL command directly in your database to remove the corrupted option:
      DELETE FROM wp_options WHERE option_name='tribe_pue_key_notices';?

      Important: Ensure you’re using the correct database table prefix (e.g., wp_). Some sites use custom prefixes, so double-check this before running the query.

    Step 2: Add a Temporary Snippet

    To prevent the issue from recurring until a permanent fix is released, set up the following snippet:

    add_action( 'tribe_pue_notices_save_notices', function ( $notices ) { foreach ( $notices as $key => &$plugin_lists ) { // Purge any elements that are not arrays if ( ! is_array( $plugin_lists ) ) { unset( $notices[ $key ] ); continue; } $plugin_lists = array_unique( $plugin_lists ); foreach ( $plugin_lists as $plugin => $data ) { $notices[ $key ][ $plugin ] = is_array( $data ) ? array_unique( $data ) : $data; } } update_option( 'tribe_pue_key_notices', $notices ); // move this out of the loop }, PHP_INT_MAX )

    This ensures that the problematic option won’t get filled with duplicate data over time.
    ?
    Step 3: Remove the Initial Snippet

    If you used the snippet from Step 1 to clean the corrupted option, you can now safely remove it.?

    If you’re not familiar with coding, you can use the Code Snippets plugin, which removes the need to add custom snippets to your theme’s functions.php file.

    Feel free to let me know how it goes.

    I had to modify my code snippet to the following but I was then able to get the backend of the website working again.

    add_action( 'init', 'fix_events' , 1 );
    function fix_events() {
    delete_option( 'tribe_pue_key_notices' );
    }

    Plugin Support Darian

    (@d0153)

    I just noticed that the snippet provided in Step 2 was not formatted correctly. Please check the correct snippet below:

    add_action(
    'tribe_pue_notices_save_notices',
    function ( $notices ) {
    foreach ( $notices as $key => &$plugin_lists ) {
    // Purge any elements that are not arrays
    if ( ! is_array( $plugin_lists ) ) {
    unset( $notices[ $key ] );
    continue;
    }

    $plugin_lists = array_unique( $plugin_lists );
    foreach ( $plugin_lists as $plugin => $data ) {
    $notices[ $key ][ $plugin ] = is_array( $data ) ? array_unique( $data ) : $data;
    }
    }

    update_option( 'tribe_pue_key_notices', $notices ); // move this out of the loop
    },
    PHP_INT_MAX
    );

    Plugin Support Darian

    (@d0153)

    Hi there,

    It seems like it has been some time since we received a response from you, therefore, I will consider this matter as resolved. If you require any further assistance, please do not hesitate to start a new thread.

    I struggled with this problem for many hours before figuring out it was this. My site was totally blocked.
    Is the solution under its way? To this seems huge.

    Opened new thread as this thread is marked resolved but the fix is not actually released yet.

    https://www.ads-software.com/support/topic/php-fatal-error-out-of-memory-notices-php-on-line-98

    • This reply was modified 2 months, 1 week ago by nezzy.
    Plugin Support Darian

    (@d0153)

    Hi there,

    We’re back with some great news!

    The issue causing the Fatal Error: Memory Exhaustion has been resolved.

    Please update your plugins to the latest versions to apply the fix to your site.

    As always, we recommend testing the updates on a staging site first and ensuring you have a recent backup of your site. For step-by-step guidance on creating a staging site, check out this resource: Creating and Using a WordPress Staging Site.

    If you encounter any issues after updating to the latest releases, please reach out and let us know.

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.