Question Cache Operator Back to None

Status
Not open for further replies.
I've made a change to the next version that should log the exception being thrown :)
 
Code:
Error Info
XenForo_Exception: No valid caching servers found. - library/DBTech/Optimise/Operator/Redis.php:58
Generated By: Unknown Account, Kemarin pada 9:22 PM

Stack Trace
#0 /home/xxxxxxxxxxx/public_html/library/DBTech/Optimise/Operator/Abstract.php(332): DBTech_Optimise_Operator_Redis->connect()
#1 /home/xxxxxxxxxxx/public_html/library/DBTech/Optimise/XenForo/Model/Thread.php(26): DBTech_Optimise_Operator_Abstract::createFromOptions('60')
#2 /home/xxxxxxxxxxx/public_html/library/XenForo/ControllerHelper/ForumThreadPost.php(154): DBTech_Optimise_XenForo_Model_Thread->getThreadById(1208252, Array)
#3 /home/xxxxxxxxxxx/public_html/library/XenForo/ControllerHelper/ForumThreadPost.php(76): XenForo_ControllerHelper_ForumThreadPost->getThreadOrError(1208252, Array)
#4 /home/xxxxxxxxxxx/public_html/library/XenForo/ControllerPublic/Thread.php(32): XenForo_ControllerHelper_ForumThreadPost->assertThreadValidAndViewable(1208252, Array, Array)
#5 /home/xxxxxxxxxxx/public_html/library/ChangeThreadStarter/ControllerPublic/Thread.php(7): XenForo_ControllerPublic_Thread->actionIndex()
#6 /home/xxxxxxxxxxx/public_html/library/XenForo/FrontController.php(351): ChangeThreadStarter_ControllerPublic_Thread->actionIndex()
#7 /home/xxxxxxxxxxx/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#8 /home/xxxxxxxxxxx/public_html/index.php(13): XenForo_FrontController->run()
#9 {main}

PHP:
try
{
	$redis_info = $this->redis_read->info();
}
catch (Exception $e)
{
	throw new XenForo_Exception('No valid caching servers found.');// Line 58
}

Lot of free RAM
Code:
[yoo@main ~]# free -h
             total       used       free     shared    buffers     cached
Mem:          362G        75G       287G       5.4G       2.0G        24G
-/+ buffers/cache:        49G       313G
Swap:         8.0G         0B       8.0G

I think that must be temporary issue when connecting to Redis.

I have a suggestion.
What if when admin chooses a cache operator, there is a hidden option that stores the selected cache operator, let's call it "temp_cache_operator".
There is 1 new visible DBO option :
  • Automatically retry to re-choose selected cache operator every X minutes, if cache is "none" because of exception.

So there is 1 new cron which will retry to set cache operator to "temp_cache_operator" (if enabled by admin), every X minutes.

So if there is temporary issue when using cache operator, it will be retried again every X minutes.

What do you think?

Thank you.
 
Try modifying the relevant line to
PHP:
throw new XenForo_Exception('No valid caching servers found. Redis error: ' . $e->getMessage());
and see if that throws up a better error message for you.
 
Ok so here is latest error after i updated the code

Code:
Error Info
XenForo_Exception: No valid caching servers found. Redis error: Redis server went away - library/DBTech/Optimise/Operator/Redis.php:59
Generated By: xxxxxxxxxxx, Today at 12:10 PM

Stack Trace
#0 /home/xxxxxxxxxxx/public_html/library/DBTech/Optimise/Operator/Abstract.php(332): DBTech_Optimise_Operator_Redis->connect()
#1 /home/xxxxxxxxxxx/public_html/library/DBTech/Optimise/XenForo/Model/Post.php(74): DBTech_Optimise_Operator_Abstract::createFromOptions('0')
#2 /home/xxxxxxxxxxx/public_html/library/XenForo/ControllerPublic/Thread.php(68): DBTech_Optimise_XenForo_Model_Post->getPostsInThread(1201567, Array)
#3 /home/xxxxxxxxxxx/public_html/library/ChangeThreadStarter/ControllerPublic/Thread.php(7): XenForo_ControllerPublic_Thread->actionIndex()
#4 /home/xxxxxxxxxxx/public_html/library/XenForo/FrontController.php(351): ChangeThreadStarter_ControllerPublic_Thread->actionIndex()
#5 /home/xxxxxxxxxxx/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#6 /home/xxxxxxxxxxx/public_html/index.php(13): XenForo_FrontController->run()
#7 {main}
 
The first search result on Google ( Redis server went away * Issue #374 * phpredis/phpredis * GitHub ) says that having XDebug enabled can cause this issue.

PS: Processes can auto-restart, so just because it's currently running doesn't mean it didn't crash or didn't cause a problem somewhere.

The point is that this is a server-side problem and I can offer no help besides googling "redis server went away" and passing information along to you.
 
The first search result on Google ( Redis server went away * Issue #374 * phpredis/phpredis * GitHub ) says that having XDebug enabled can cause this issue.

PS: Processes can auto-restart, so just because it's currently running doesn't mean it didn't crash or didn't cause a problem somewhere.

The point is that this is a server-side problem and I can offer no help besides googling "redis server went away" and passing information along to you.
I've read it and i don't have xdebug.
I just switched from redis to APCu now.

I think redis is too confusing for me :D

You can close this thread. I will post a new one if i had issue with APCu.
 
Amusingly, here @ DBTech we have the exact opposite problem. APCu, which should be a very simple and straightforward thing, causes segfaults in apache whereas Redis works rock solid :p
 
Amusingly, here @ DBTech we have the exact opposite problem. APCu, which should be a very simple and straightforward thing, causes segfaults in apache whereas Redis works rock solid :p
I tried to run APCu for 10 minutes without problem, and then memory usage jumped, page loads slowed down to the bottom, PHP almost crashed.
And now i disabled APCu.

Do you have special redis configuration in redis.conf?

I tried filecache, but it seems sometimes "Running Test: Fetch Cache" is failed.
I think it is because file lock race condition?
 
Hello semprot,

This ticket has now been closed with the status Answered.

We hope your issue or question has been addressed to your satisfaction. If not, please feel free to re-open it by clicking this link.

If you have any further issues or questions, please feel free to start a new support ticket via the button at the top of every page.

Thank you!
 
Status
Not open for further replies.

Legacy DragonByte Optimise

XenForo 1.5.3+
Seller
DragonByte Technologies
Release date
Last update
Total downloads
258
Customer rating
0.00 star(s) 0 ratings
Back
Top