Bug Redis::connect(): connect() failed: Cannot assign requested address

Status
Not open for further replies.

semprot

Customer
Redis server : 3.2.8
PHP module : redis (3.1.1)
System test >> redis : no error. All are fine.

My redis config file :
PHP:
$config['Optimise']['redisServers'] = array(
	array('host' => '127.0.0.1', 'port' => 6379)
);

$config['Optimise']['redisMaxDelay'] = 10; // if slave server is out of sync by more than this many seconds, switch to master
//$config['Optimise']['redisTimeout'] = 3; // if redis server doesn't respond in this many seconds, disconnect
$config['Optimise']['redisTimeout'] = 1; // if redis server doesn't respond in this many seconds, disconnect
//$config['Optimise']['redisRetry'] = 100; // retry connection in this many milliseconds
$config['Optimise']['redisRetry'] = 25; // retry connection in this many milliseconds

Error :
Code:
Error Info
ErrorException: Redis::connect(): connect() failed: Cannot assign requested address - library/DBTech/Optimise/Operator/Redis.php:46
Generated By: Unknown Account, Baru saja
Stack Trace

#0 [internal function]: XenForo_Application::handlePhpError(2, 'Redis::connect(...', '/home/MY_USERNAME/pub...', 46, Array)
#1 /home/MY_USERNAME/public_html/library/DBTech/Optimise/Operator/Redis.php(46): Redis->connect('127.0.0.1', 6379, 1, '', 25)
#2 /home/MY_USERNAME/public_html/library/DBTech/Optimise/Operator/Abstract.php(332): DBTech_Optimise_Operator_Redis->connect()
#3 /home/MY_USERNAME/public_html/library/DBTech/Optimise/XenForo/Model/Forum.php(26): DBTech_Optimise_Operator_Abstract::createFromOptions('0')
#4 /home/MY_USERNAME/public_html/library/XenForo/ControllerHelper/ForumThreadPost.php(177): DBTech_Optimise_XenForo_Model_Forum->getForumById(11, Array)
#5 /home/MY_USERNAME/public_html/library/XenForo/ControllerHelper/ForumThreadPost.php(38): XenForo_ControllerHelper_ForumThreadPost->getForumOrError(11, Array)
#6 /home/MY_USERNAME/public_html/library/XenForo/ControllerPublic/Forum.php(182): XenForo_ControllerHelper_ForumThreadPost->assertForumValidAndViewable(11, Array)
#7 /home/MY_USERNAME/public_html/library/XenForo/FrontController.php(351): XenForo_ControllerPublic_Forum->actionForum()
#8 /home/MY_USERNAME/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#9 /home/MY_USERNAME/public_html/index.php(13): XenForo_FrontController->run()
#10 {main}

Request State

array(3) {
  ["url"] => string(68) "http://xxxxxxxxxxxxxxxxxx/forums/xxxxxxxxxxxx.1/page-2"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
According to Google, this is a problem with your server:

Sometimes the "Cannot assign requested address" error can be seen when running out of file descriptors / available TCP ports: are you sure your server is properly configured to handle the current load? If you happen to see a huge number of connections in a TIME_WAIT state by running the following command:

Code:
netstat -n | grep TIME_WAIT | wc -l

then you might need to tune your server. Maybe you can try increasing the number of ephemereal ports configured for the TCP stack or setting the TIME_WAIT reuse with /proc/sys/net/ipv4/tcp_tw_reuse, lowering the FIN timeout is a last resort. These are just a couple of ideas, remember to review them according to your current server configuration and the services that are running on it. Check also for the presence of relevant errors in /var/log/messages.
 
Hello semprot,

This ticket has now been closed with the status Not A Bug.

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