Support » Plugin: Redis Object Cache » Can’t upload image if plugin is enabled

  • Resolved Piotr Kunicki

    (@kuperman87)


    Hi

    I can’t upload some images if Redis Object Cache is active..

    I can see the following error: https://assets.tuning4web.com/Notification_Center-3_2A9F6891.jpg

    but the image size is around 150KB and 1300px width..

    and If I disable Object Cache I can upload the same image without any problem..

    Diagnostic settings are here:

    Status: Connected Client: PhpRedis (v5.3.7) Drop-in: Valid Disabled: No Ping: 1 Errors: [] PhpRedis: 5.3.7 Relay: Not loaded Predis: 2.1.2 Credis: Not loaded PHP Version: 8.0.30 Plugin Version: 2.4.4 Redis Version: 6.0.16 Multisite: No Metrics: Enabled Metrics recorded: 21010 Filesystem: Working Global Prefix: “xxx_” Blog Prefix: “xxx_” WP_REDIS_PLUGIN_PATH: “/………com/public_html/wp-content/plugins/redis-cache” 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”, “network-queries”, “site-queries”, “user-queries” ] Ignored Groups: [ “counts”, “plugins”, “themes”, “theme_json” ] Unflushable Groups: [] Groups Types: { “blog-details”: “global”, “blog-id-cache”: “global”, “blog-lookup”: “global”, “global-posts”: “global”, “networks”: “global”, “rss”: “global”, “sites”: “global”, “site-details”: “global”, “site-lookup”: “global”, “site-options”: “global”, “site-transient”: “global”, “users”: “global”, “useremail”: “global”, “userlogins”: “global”, “usermeta”: “global”, “user_meta”: “global”, “userslugs”: “global”, “redis-cache”: “global”, “counts”: “ignored”, “plugins”: “ignored”, “themes”: “ignored”, “blog_meta”: “global”, “network-queries”: “global”, “site-queries”: “global”, “user-queries”: “global”, “theme_json”: “ignored” } Drop-ins: [ “advanced-cache.php v by “, “Redis Object Cache Drop-In v2.4.4 by Till Krüss” ]


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

    (@tillkruess)

    Are you running out of PHP memory? Check your logs.

    Thread Starter Piotr Kunicki

    (@kuperman87)

    No, there are no problem with out of PHP memory, hosting support also confirm that there are no errors connected with file uploading (in log files).. also a lot of other images are uploaded correctly..

    • This reply was modified 5 months, 4 weeks ago by Piotr Kunicki.
    Plugin Author Till Krüss

    (@tillkruess)

    Are you seeing any error messages in your logs?

    Thread Starter Piotr Kunicki

    (@kuperman87)

    @tillkruess no, can’t see any error messages..
    If i disable Redis Object Cache plugin, uploading works properly, if I enable it again – uploading doesn’t work.

    Plugin Author Till Krüss

    (@tillkruess)

    Might be a conflict with another plugin. We don’t have control over that, all we provide is the wp_cache_*() API.

    Thread Starter Piotr Kunicki

    (@kuperman87)

    Hi,

    Unfortunately the issue is not resolved..
    I’ve switched to browser uploader in Media -> Add New and now when I try to upload some images I can see the following error:
    https://assets.tuning4web.com/terr_2AFAFD11.png

    I upload 5-10 images per week and always one or two are problematic and I need to disable Redis Object Cache plugin to upload them (image sizes are similar, format is the same)

    Plugin Support Julie

    (@julieadrienne)

    Hi Piotr, can you post the full error message and stack trace from your error logs?

    Thread Starter Piotr Kunicki

    (@kuperman87)

    Hi,
    Sure, here you can see full error message:

    Exception: Serialization of 'Closure' is not allowed in /..//wp-content/object-cache.php:2771
    Stack trace:
    #0 /..//wp-content/object-cache.php(2771): serialize()
    #1 /..//wp-content/object-cache.php(2159): WP_Object_Cache->maybe_serialize()
    #2 /..//wp-content/object-cache.php(294): WP_Object_Cache->set()
    #3 /..//wp-content/plugins/bh-wc-checkout-rate-limiter/vendor-prefixed/brianhenryie/bh-wp-logger/src/api/class-api.php(305): wp_cache_set()
    #4 /..//wp-content/plugins/bh-wc-checkout-rate-limiter/vendor-prefixed/brianhenryie/bh-wp-logger/src/api/class-api.php(329): BrianHenryIE\Checkout_Rate_Limiter\WP_Logger\API\API->get_backtrace()
    #5 /..//wp-content/plugins/bh-wc-checkout-rate-limiter/vendor-prefixed/brianhenryie/bh-wp-logger/src/php/class-php-error-handler.php(187): BrianHenryIE\Checkout_Rate_Limiter\WP_Logger\API\API->is_backtrace_contains_plugin()
    #6 /..//wp-content/plugins/bh-wc-checkout-rate-limiter/vendor-prefixed/brianhenryie/bh-wp-logger/src/php/class-php-error-handler.php(99): BrianHenryIE\Checkout_Rate_Limiter\WP_Logger\PHP\PHP_Error_Handler->is_related_error()
    #7 [internal function]: BrianHenryIE\Checkout_Rate_Limiter\WP_Logger\PHP\PHP_Error_Handler->plugin_error_handler()
    #8 /..//wp-content/plugins/wp-cerber/cerber-common.php(4325): octdec()
    #9 [internal function]: {closure}()
    #10 /..//wp-content/plugins/wp-cerber/cerber-common.php(4332): array_map()
    #11 /..//wp-content/plugins/wp-cerber/cerber-load.php(8640): cerber_fromcharcode()
    #12 /..//wp-content/plugins/wp-cerber/cerber-load.php(8487): cerber_detect_js_code()
    #13 /..//wp-content/plugins/wp-cerber/cerber-load.php(8756): cerber_inspect_value()
    #14 /..//wp-content/plugins/wp-cerber/cerber-load.php(853): cerber_inspect_uploads()
    #15 /..//wp-includes/class-wp-hook.php(310): {closure}()
    #16 /..//wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #17 /..//wp-includes/plugin.php(517): WP_Hook->do_action()
    #18 /..//wp-settings.php(495): do_action()
    #19 /..//wp-config.php(110): require_once('...')
    #20 /..//wp-load.php(50): require_once('...')
    #21 /..//wp-admin/admin.php(34): require_once('...')
    #22 /..//wp-admin/media-new.php(13): require_once('...')
    #23 {main}
    Plugin Support Julie

    (@julieadrienne)

    Can you try disabling wp-cerber and flush the cache to see if that’s causing it.

    Otherwise try disabling bh-wc-checkout-rate-limiter and flushing the cache.

    Once we know which plugin causes it we can open a fix request with them.

    Thread Starter Piotr Kunicki

    (@kuperman87)

    Hi,
    I’ve disabled wp-cerber, flush object cache, remove wp-super cache files and seems to be fine now (bh-wc-checkout-rate-limiter is still active and images may be uploaded without any issue)

    Plugin Author Till Krüss

    (@tillkruess)

    Glad to hear that. If the error occurs again after activating another plugin, please let us know.

    Thread Starter Piotr Kunicki

    (@kuperman87)

    Hi,
    Any news regarding reported issue? I’ve updated WP Cerber plugin, but unfortunately I still have the same problem with uploading some images..

    Plugin Support Julie

    (@julieadrienne)

    It up to the WP Cerber team to ensure their plugin works with WordPress persistent object cache API. Not much we can do on our end.

    Thread Starter Piotr Kunicki

    (@kuperman87)

    Hi,
    I understand, unfortunately today I’ve disabled Object Cache, to upload image and when I’m trying to enable it again a can see a bigger issue.. Our website is not rendered properly and at the bottom I can see:

    Error establishing a Redis connection
    To disable Redis, delete the object-cache.php file in the /wp-content/ directory.

    Tried to remove this file, but the result is the same, in the wordpress log file I can see:

    [01-Feb-2024 12:02:19 UTC] Exception: Serialization of 'Closure' is not allowed in /../public_html/wp-content/object-cache.php:2767
    Stack trace:
    #0 /../public_html/wp-content/object-cache.php(2767): serialize()
    #1 /../public_html/wp-content/object-cache.php(2155): WP_Object_Cache->maybe_serialize()
    #2 /../public_html/wp-content/object-cache.php(294): WP_Object_Cache->set()
    #3 /../public_html/wp-content/plugins/bh-wc-checkout-rate-limiter/vendor-prefixed/brianhenryie/bh-wp-logger/src/api/class-api.php(305): wp_cache_set()
    #4 /../public_html/wp-content/plugins/bh-wc-checkout-rate-limiter/vendor-prefixed/brianhenryie/bh-wp-logger/src/api/class-api.php(329): BrianHenryIE\Checkout_Rate_Limiter\WP_Logger\API\API->get_backtrace()
    #5 /../public_html/wp-content/plugins/bh-wc-checkout-rate-limiter/vendor-prefixed/brianhenryie/bh-wp-logger/src/php/class-php-error-handler.php(187): BrianHenryIE\Checkout_Rate_Limiter\WP_Logger\API\API->is_backtrace_contains_plugin()
    #6 /../public_html/wp-content/plugins/bh-wc-checkout-rate-limiter/vendor-prefixed/brianhenryie/bh-wp-logger/src/php/class-php-error-handler.php(99): BrianHenryIE\Checkout_Rate_Limiter\WP_Logger\PHP\PHP_Error_Handler->is_related_error()
    #7 /../public_html/wp-content/plugins/woocommerce/src/Admin/DataSourcePoller.php(138): BrianHenryIE\Checkout_Rate_Limiter\WP_Logger\PHP\PHP_Error_Handler->plugin_error_handler()
    #8 /../public_html/wp-content/plugins/woocommerce/src/Admin/DataSourcePoller.php(112): Automattic\WooCommerce\Admin\DataSourcePoller->read_specs_from_data_sources()
    #9 /../public_html/wp-content/plugins/woocommerce/src/Internal/Admin/RemoteFreeExtensions/Init.php(76): Automattic\WooCommerce\Admin\DataSourcePoller->get_specs_from_data_sources()
    #10 /../public_html/wp-content/plugins/woocommerce/src/Internal/Admin/RemoteFreeExtensions/Init.php(33): Automattic\WooCommerce\Internal\Admin\RemoteFreeExtensions\Init::get_specs()
    #11 /../public_html/wp-content/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/Marketing.php(84): Automattic\WooCommerce\Internal\Admin\RemoteFreeExtensions\Init::get_extensions()
    #12 /../public_html/wp-content/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/Marketing.php(73): Automattic\WooCommerce\Admin\Features\OnboardingTasks\Tasks\Marketing::get_plugins()
    #13 /../public_html/wp-content/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskList.php(304): Automattic\WooCommerce\Admin\Features\OnboardingTasks\Tasks\Marketing->can_view()
    #14 [internal function]: Automattic\WooCommerce\Admin\Features\OnboardingTasks\TaskList->Automattic\WooCommerce\Admin\Features\OnboardingTasks\{closure}()
    #15 /../public_html/wp-content/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskList.php(305): array_filter()
    #16 /../public_html/wp-content/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskList.php(171): Automattic\WooCommerce\Admin\Features\OnboardingTasks\TaskList->get_viewable_tasks()
    #17 /../public_html/wp-content/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskLists.php(349): Automattic\WooCommerce\Admin\Features\OnboardingTasks\TaskList->is_visible()
    #18 [internal function]: Automattic\WooCommerce\Admin\Features\OnboardingTasks\TaskLists::Automattic\WooCommerce\Admin\Features\OnboardingTasks\{closure}()
    #19 /../public_html/wp-content/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskLists.php(350): array_filter()
    #20 /../public_html/wp-content/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskLists.php(455): Automattic\WooCommerce\Admin\Features\OnboardingTasks\TaskLists::get_visible()
    #21 /../public_html/wp-includes/class-wp-hook.php(324): Automattic\WooCommerce\Admin\Features\OnboardingTasks\TaskLists::task_list_preloaded_settings()
    #22 /../public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters()
    #23 /../public_html/wp-content/plugins/woocommerce/src/Internal/Admin/WCAdminSharedSettings.php(61): apply_filters()
    #24 /../public_html/wp-content/plugins/woocommerce/src/Blocks/Assets/AssetDataRegistry.php(268): Automattic\WooCommerce\Internal\Admin\WCAdminSharedSettings->Automattic\WooCommerce\Internal\Admin\{closure}()
    #25 /../public_html/wp-content/plugins/woocommerce/src/Blocks/Assets/AssetDataRegistry.php(393): Automattic\WooCommerce\Blocks\Assets\AssetDataRegistry->execute_lazy_data()
    #26 /../public_html/wp-includes/class-wp-hook.php(324): Automattic\WooCommerce\Blocks\Assets\AssetDataRegistry->enqueue_asset_data()
    #27 /../public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
    #28 /../public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
    #29 /../public_html/wp-includes/script-loader.php(2245): do_action()
    #30 /../public_html/wp-includes/class-wp-hook.php(324): wp_print_footer_scripts()
    #31 /../public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
    #32 /../public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
    #33 /../public_html/wp-includes/general-template.php(3068): do_action()
    #34 /../public_html/wp-content/themes/.../footer.php(100): wp_footer()
    #35 /../public_html/wp-includes/template.php(790): require_once('...')
    #36 /../public_html/wp-includes/template.php(725): load_template()
    #37 /../public_html/wp-includes/general-template.php(92): locate_template()
    #38 /../public_html/wp-content/themes/.../single-lesson.php(178): get_footer()
    #39 /../public_html/wp-includes/template-loader.php(106): include('...')
    #40 /../public_html/wp-blog-header.php(19): require_once('...')
    #41 /../public_html/index.php(17): require('...')
    #42 {main}
    Plugin Author Till Krüss

    (@tillkruess)

    Try flushing your entire Redis server, before connecting again.

    You can do that using redis-cli FLUSHALL but you’ll need to specify the host and port of your Redis Server.

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