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

There is nothing in place to catch the errors that don't fit in the retry_exception_messages #34

Closed
jtsternberg opened this issue Nov 17, 2015 · 4 comments
Milestone

Comments

@jtsternberg
Copy link

As of right now, if a RedisException is thrown which is not a 'wp_redis_retry_exception_messages', (see https://github.com/pantheon-systems/wp-redis/blob/master/object-cache.php#L749 ), then a fatal error will occur. Again, this is why this PR/Issue was created: #5

@danielbachhuber
Copy link
Contributor

Hm. I don't know how I feel about catching all Redis exceptions. Right now, we're just catching those we think we know how to safely handle.

What exception are you seeing in the real world that you'd rather catch than retry?

@jtsternberg
Copy link
Author

'read error on connection' is definitely one (which I'm adding via the filter now). I'm just not sure fataling the site is a better alternative to... something else.

@danielbachhuber
Copy link
Contributor

Ok. Note, you'll need to add your filter to sunrise.php in order for it to apply, as a mu-plugin will be too late.

@jtsternberg
Copy link
Author

Another spot which needs some try/catch/reconnection:

[17-Nov-2015 22:12:59 UTC] PHP Fatal error:  Uncaught exception 'RedisException' with message 'Redis server went away' in D:\home\site\wwwroot\wp-content\plugins\wp-redis\object-cache.php:711
Stack trace:
#0 D:\home\site\wwwroot\wp-content\plugins\wp-redis\object-cache.php(711): Redis->auth('ymTsuP1OTa/ydbc...')
#1 D:\home\site\wwwroot\wp-content\plugins\wp-redis\object-cache.php(838): WP_Object_Cache->_connect_redis()
#2 D:\home\site\wwwroot\wp-content\plugins\wp-redis\object-cache.php(135): WP_Object_Cache->__construct()
#3 D:\home\site\wwwroot\wp-includes\load.php(449): wp_cache_init()
#4 D:\home\site\wwwroot\wp-settings.php(86): wp_start_object_cache()
#5 D:\home\site\wwwroot\wp-config.php(123): require_once('D:\\home\\site\\ww...')
#6 D:\home\site\wwwroot\wp-load.php(37): require_once('D:\\home\\site\\ww...')
#7 D:\home\site\wwwroot\wp-login.php(12): require('D:\\home\\site\\ww...')
#8 {main}
  thrown in D:\home\site\wwwroot\wp-content\plugins\wp-redis\object-cache.php on line 711

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

No branches or pull requests

2 participants