• Resolved stripytee

    (@stripytee)


    I’ve had a recurring “Critical error” and the WP Engine support person has identified this plugin as the cause of the following memory allocation suck.

    “3 PHP Fatal error:? Allowed memory size of 1073741824 bytes exhausted (tried to allocate 1060864 bytes) in /nas/content/live/nogapsurgery/wp-includes/class-wpdb.php on line 2425”

    We have tried updateing to PHP 8.2 multiple times but does not get rid of the issue. Please advise. Have temp turned off plugin

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Nithin – WPMU DEV Support

    (@wpmudevsupport11)

    Hi @stripytee,

    We have noticed in some cases when there are a high number of plugins it can cause wphb_minify_group to increase on the Hummingbird side.

    Could you please try this snippet and check whether it makes any difference?

    <?php
    
    add_action( 'plugins_loaded', function() {
    	if ( ! defined( 'WPHB_VERSION' ) ) {
    		return; // Hummingbird is not installed/enabled.
    	}
    	add_action( 'pre_get_posts', function( $query ) {
    		if ( ! empty( $query->query['post_type'] ) && 'wphb_minify_group' === $query->query['post_type'] ) {
    			if ( -1 === $query->query['posts_per_page'] ) {
    				$query->query['posts_per_page']      = 10;
    				$query->query_vars['posts_per_page'] = 10;
    			}
    		}
    	});
    });

    You can add the above snippet as mu-plugins. Please check this link on how to implement the above code as a mu-plugins:
    https://wpmudev.com/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-plugins

    Please do let us know how that goes.

    Kind Regards,

    Nithin

    Plugin Support Nithin – WPMU DEV Support

    (@wpmudevsupport11)

    Hi @stripytee,

    Since we haven’t heard from you for a while. I’ll mark this thread as resolved for now. Please feel free to re-open the thread if you need further assistance.

    Best Regards
    Nithin

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Critical Error – PHP memory allocation’ is closed to new replies.