• Resolved therealgilles

    (@chamois_blanc)


    Hello,

    I am observing the following stack trace that appeared recently on some of my event pages right after editing them (events from The Events Calendar plugin):

    [07-Sep-2020 02:20:58 UTC] PHP Fatal error:  Uncaught Error: Maximum function nesting level of '256' reached, aborting! in /var/www/html/wp-content/object-cache.php:1798
    Stack trace:
    #0 /var/www/html/wp-content/object-cache.php(1798): str_replace(':', '-', 'posts')
    #1 /var/www/html/wp-content/object-cache.php(1818): WP_Object_Cache->sanitize_key_part('posts')
    #2 /var/www/html/wp-content/object-cache.php(1781): WP_Object_Cache->is_global_group('posts')
    #3 /var/www/html/wp-content/object-cache.php(1332): WP_Object_Cache->build_key(141935, 'posts')
    #4 /var/www/html/wp-content/object-cache.php(114): WP_Object_Cache->get(141935, 'posts', false, NULL)
    #5 /var/www/html/wp-includes/class-wp-post.php(239): wp_cache_get(141935, 'posts')
    #6 /var/www/html/wp-includes/post.php(780): WP_Post::get_instance(141935)
    #7 /var/www/html/wp-content/plugins/pods/classes/PodsMeta.php(2950): get_post(141935)
    #8 /var/www/html/wp-content/plugins/pods/classes/PodsMeta.php(3043): PodsMeta->get_object('post_type', 141935)
    #9 /var/www/html/wp-content/plugins/pods/classes/PodsMeta.php in /var/www/html/wp-content/object-cache.php on line 1798

    Disabling the object cache makes the error go away. Please advise.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Till Krüss

    (@tillkruess)

    I’d reach out to the calendar plugin support team and ask them to fix their object cache support.

    There is unfortunately nothing I can do on the plugin side to fix it.

    You could increase your max error nesting and see if it spits out an error, but it seems like an nesting loop in your calendar plugin.

    Thread Starter therealgilles

    (@chamois_blanc)

    Thank you for the feedback ??

    I tried to increase the nesting to 10,000 and it still failed with the same error.

    How do you figure the problem comes from the calendar plugin vs the Pods plugin vs the cache plugin?

    Just realized I only gave you one stack trace, there are actually two. Here they are together:

    [07-Sep-2020 02:20:58 UTC] PHP Fatal error:  Uncaught Error: Maximum function nesting level of '256' reached, aborting! in /var/www/html/wp-content/object-cache.php:1798
    Stack trace:
    #0 /var/www/html/wp-content/object-cache.php(1798): str_replace(':', '-', 'posts')
    #1 /var/www/html/wp-content/object-cache.php(1818): WP_Object_Cache->sanitize_key_part('posts')
    #2 /var/www/html/wp-content/object-cache.php(1781): WP_Object_Cache->is_global_group('posts')
    #3 /var/www/html/wp-content/object-cache.php(1332): WP_Object_Cache->build_key(141935, 'posts')
    #4 /var/www/html/wp-content/object-cache.php(114): WP_Object_Cache->get(141935, 'posts', false, NULL)
    #5 /var/www/html/wp-includes/class-wp-post.php(239): wp_cache_get(141935, 'posts')
    #6 /var/www/html/wp-includes/post.php(780): WP_Post::get_instance(141935)
    #7 /var/www/html/wp-content/plugins/pods/classes/PodsMeta.php(2950): get_post(141935)
    #8 /var/www/html/wp-content/plugins/pods/classes/PodsMeta.php(3043): PodsMeta->get_object('post_type', 141935)
    #9 /var/www/html/wp-content/plugins/pods/classes/PodsMeta.php in /var/www/html/wp-content/object-cache.php on line 1798
    [07-Sep-2020 02:20:58 UTC] PHP Fatal error:  Uncaught Error: Maximum function nesting level of '256' reached, aborting! in /var/www/html/wp-includes/plugin.php:923
    Stack trace:
    #0 /var/www/html/wp-includes/plugin.php(923): spl_object_hash(Object(Tribe\Events\Views\V2\Hooks))
    #1 /var/www/html/wp-includes/class-wp-hook.php(172): _wp_filter_build_unique_id('tribe_get_optio...', Array, 10)
    #2 /var/www/html/wp-includes/plugin.php(281): WP_Hook->remove_filter('tribe_get_optio...', Array, 10)
    #3 /var/www/html/wp-content/plugins/the-events-calendar/src/Tribe/Views/V2/Hooks.php(739): remove_filter('tribe_get_optio...', Array, 10)
    #4 /var/www/html/wp-includes/class-wp-hook.php(289): Tribe\Events\Views\V2\Hooks->filter_get_stylesheet_option(false, 'tribe_zoom_refr...')
    #5 /var/www/html/wp-includes/plugin.php(206): WP_Hook->apply_filters(false, Array)
    #6 /var/www/html/wp-content/plugins/the-events-calendar/common/src/functions/template-tags/general.php(29): apply_filters('tribe_get_optio...', false, 'tribe_zoom_refr...', false)
    #7 /var/www/html/wp-content/plugins/e in /var/www/html/wp-includes/plugin.php on line 923
    Plugin Author Till Krüss

    (@tillkruess)

    Mhh. Can you try flushing your Redis server? And post your full diagnostics?

    Thread Starter therealgilles

    (@chamois_blanc)

    Still trying to debug this. From what I can see, when the cache plugin calls serialize() on the event post object here:

    object-cache.php, line 2005:
    return serialize( $data );

    it causes the following code to be run:

    the-events-calendar/src/Tribe/Models/Post_Types/Event.php, line 221:

    				'schedule_details'       => ( new Lazy_String(
    					static function () use ( $post_id ) {
    						return tribe_events_event_schedule_details( $post_id );
    					},
    					false
    				) )->on_resolve( $cache_this ),

    which creates a loop.

    Plugin Author Till Krüss

    (@tillkruess)

    Can you open a GitHub issue on this?

    Plugin Author Till Krüss

    (@tillkruess)

    Plugin Author Till Krüss

    (@tillkruess)

    Can you please post your full diagnostics data from the plugin settings?

    Thread Starter therealgilles

    (@chamois_blanc)

    Hi Till,

    Sorry for the delay. My development server that I use to run xdebug has been infected by the Kinsing malware and I have been trying to figure out how it was able to get in.

    I added ‘tribe-events’ to the ignored groups for now. Below is the diagnostics output:

    Status: Connected
    Client: PhpRedis (v5.3.1)
    Drop-in: Valid
    Disabled: No
    Filesystem: Working
    Ping: 1
    Errors: []
    PhpRedis: 5.3.1
    Predis: Not loaded
    Credis: Not loaded
    PHP Version: 7.4.8
    Plugin Version: 2.0.13
    Redis Version: 3.2.6
    Multisite: No
    Global Prefix: "<MY_SITE_GLOBAL_PREFIX>"
    Blog Prefix: "<MY_SITE_BLOG_PREFIX>"
    WP_REDIS_PREFIX: "<MY_SITE_WP_REDIS_PREFIX>"
    WP_CACHE_KEY_SALT: "<MY_SITE_WP_CACHE_KEY_SALT>"
    WP_REDIS_IGNORED_GROUPS: ["counts","plugins","themes","tribe-events"]
    Global Groups: [
        "blog-details",
        "blog-id-cache",
        "blog-lookup",
        "global-posts",
        "networks",
        "rss",
        "sites",
        "site-details",
        "site-lookup",
        "site-options",
        "site-transient",
        "users",
        "useremail",
        "userlogins",
        "usermeta",
        "user_meta",
        "userslugs",
        "redis-cache",
        "blog_meta"
    ]
    Ignored Groups: [
        "counts",
        "plugins",
        "themes",
        "tribe-events",
        "wpfront-user-role-editor",
        "tribe-events-non-persistent"
    ]
    Unflushable Groups: []
    Drop-ins: [
        "advanced-cache.php v by ",
        "Redis Object Cache Drop-In v2.0.13 by Till Krüss"
    ]

    I have not been able to narrow down the problem with xdebug yet. I will continue the investigation on github.

    Jaime

    (@jaimemarchwinski)

    Hi @chamois_blanc

    We at The Events Calendar just wanted to let you know that a fix has been released for this issue!

    Please try updating and let us know if you are experiencing any further issues. As always, we recommend running updates on your?staging site?before doing so on your live site, just to be on the safe side.

    You can check out the release notes here:
    https://theeventscalendar.com/release-notes/virtual-events-1-1-1/

    Thanks again for your patience while we worked on getting this fixed!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Redis plugin causes ‘Maximum function nesting level’ error’ is closed to new replies.