Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error 500 when returning a cached result #4

Closed
adrianbenavides opened this issue Apr 29, 2018 · 1 comment
Closed

Error 500 when returning a cached result #4

adrianbenavides opened this issue Apr 29, 2018 · 1 comment

Comments

@adrianbenavides
Copy link

adrianbenavides commented Apr 29, 2018

After an endpoint is correctly cached, subsequent calls may fail with an error 500.

Here is the php log:

php_1        | [29-Apr-2018 16:52:16] WARNING: [pool www] child 78 said into stderr: "NOTICE: PHP message: PHP Fatal error:  Uncaught Exception: Serialization of 'Closure' is not allowed in /var/www/html/web/wp/wp-includes/functions.php:440"
php_1        | [29-Apr-2018 16:32:19] WARNING: [pool www] child 87 said into stderr: "Stack trace:"
php_1        | [29-Apr-2018 16:32:19] WARNING: [pool www] child 87 said into stderr: "#0 /var/www/html/web/app/object-cache.php(1130): serialize(Object(WP_REST_Response))"
php_1        | [29-Apr-2018 16:32:19] WARNING: [pool www] child 87 said into stderr: "#1 /var/www/html/web/app/object-cache.php(836): WP_Object_Cache->maybe_serialize(Object(WP_REST_Response))"
php_1        | [29-Apr-2018 16:32:19] WARNING: [pool www] child 87 said into stderr: "#2 /var/www/html/web/app/object-cache.php(227): WP_Object_Cache->set('/wp-json/wp-api...', Object(WP_REST_Response), 'rest_api', 600)"
php_1        | [29-Apr-2018 16:32:19] WARNING: [pool www] child 87 said into stderr: "#3 /var/www/html/web/app/plugins/wp-rest-api-object-cache/src/RestApi/RestDispatch.php(225): wp_cache_set('/wp-json/wp-api...', Object(WP_REST_Response), 'rest_api', 600)"
php_1        | [29-Apr-2018 16:32:19] WARNING: [pool www] child 87 said into stderr: "#4 /var/www/html/web/app/plugins/wp-rest-api-object-cache/src/RestApi/RestDispatch.php(146): Dwnload\WpRestApi\RestApi\RestDispatch->getCachedResult(Object(WP_REST_Server), Object(WP_REST_Request), '/wp-json/wp-api...', 'rest_api')"
php_1        | [29-Apr-2018 16:32:19] WARNING: [pool www] child 87 said into stderr: "#5 /var/www/html/vendor/thefrosty/wp-utilities/src/Plugin/HooksTrait.php(145): Dwnload\WpRestApi\RestApi\RestDispatch->preDispatch..."
php_1        | 172.18.0.8 -  29/Apr/2018:16:32:18 +0000 "GET /index.php" 500

Also, there is a warning message:

php_1        | [29-Apr-2018 16:27:21] WARNING: [pool www] child 87 said into stderr: "NOTICE: PHP message: PHP Warning:  call_user_func_array() expects parameter 1 to be a valid callback, cannot access protected method Dwnload\WpRestApi\WpAdmin\Admin::renderPage() in /var/www/html/web/wp/wp-includes/class-wp-hook.php on line 286"
php_1        | [29-Apr-2018 16:27:21] WARNING: [pool www] child 87 said into stderr: "NOTICE: PHP message: PHP Stack trace:"
php_1        | [29-Apr-2018 16:27:21] WARNING: [pool www] child 87 said into stderr: "NOTICE: PHP message: PHP   1. {main}() /var/www/html/web/wp/wp-admin/options-general.php:0"
php_1        | [29-Apr-2018 16:27:21] WARNING: [pool www] child 87 said into stderr: "NOTICE: PHP message: PHP   2. require_once() /var/www/html/web/wp/wp-admin/options-general.php:10"
php_1        | [29-Apr-2018 16:27:21] WARNING: [pool www] child 87 said into stderr: "NOTICE: PHP message: PHP   3. do_action($tag = *uninitialized*, $arg = *uninitialized*) /var/www/html/web/wp/wp-admin/admin.php:224"
php_1        | [29-Apr-2018 16:27:21] WARNING: [pool www] child 87 said into stderr: "NOTICE: PHP message: PHP   4. WP_Hook->do_action($args = *uninitialized*) /var/www/html/web/wp/wp-includes/plugin.php:453"
php_1        | [29-Apr-2018 16:27:21] WARNING: [pool www] child 87 said into stderr: "NOTICE: PHP message: PHP   5. WP_Hook->apply_filters($value = *uninitialized*, $args = *uninitialized*) ****

Using

  • wp-rest-api-object-cache: 1.2.0
  • WordPress Version: 4.9.5
  • PHP Version: 7.2.5
  • MySQL Version: 5.5.5
  • Server Software: nginx/1.13.12
@adrianbenavides
Copy link
Author

I've found what was causing the error 500: I forgot to uninstall the Redis Object plugin before testing this one.

The warning message is still there though and I can't see the content of the plugins' admin page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant