- 积分
- 357
- 威望
-
- 金钱
-
- 注册时间
- 2017-12-9
- 在线时间
- 小时
- 最后登录
- 1970-1-1
|
网站出现 500
Connection to Redis localhost:6379 failed after 2 failures.Last Error : (1) Connection refused
Could not connect to Redis at 127.0.0.1:6379: Connection refused
---------------------------
我架了多域名网站, 同时开了2个虚拟主机, eyewearking.conf 以及opticaluk.conf
map部分的分别 如下:
eyewearking.conf
(eyewearking.com, glassesbay.com)
map $http_host $MAGE_RUN_CODE {
default '';
www.eyewearking.com eyewearking;
eyewearking.com eyewearking;
www.glassesbay.com glassesbay;
glassesbay.com glassesbay;
}
opticaluk.conf
(opticaluk.com, glassespark.com)
map $http_host $MAGE_RUN_CODE {
default '';
www.opticaluk.com opticaluk;
opticaluk.com opticaluk;
www.glassespark.com glassespark;
glassespark.com glassespark;
}
---------------------
我发现如这样分别在不同的虚拟主机中设置, 网站运行不了。
如在nginx.conf加如下代码:
map $http_host $MAGE_RUN_CODE {
default '';
www.eyewearking.com eyewearking;
eyewearking.com eyewearking;
www.glassesbay.com glassesbay;
glassesbay.com glassesbay;
www.opticaluk.com opticaluk;
opticaluk.com opticaluk;
www.glassespark.com glassespark;
glassespark.com glassespark;
}
网站可以运行,可不长时间redis就会卡死。
网站的redis部分如下
'session' => [
'save' => 'redis',
'redis' => [
'host' => 'localhost',
'port' => '6379',
'password' => '',
'timeout' => '2.5',
'persistent_identifier' => '',
'database' => '2',
'compression_threshold' => '2048',
'compression_library' => 'gzip',
'log_level' => '3',
'max_concurrency' => '6',
'break_after_frontend' => '5',
'break_after_adminhtml' => '30',
'first_lifetime' => '600',
'bot_first_lifetime' => '60',
'bot_lifetime' => '7200',
'disable_locking' => '0',
'min_lifetime' => '60',
'max_lifetime' => '2592000',
'sentinel_master' => '',
'sentinel_servers' => '',
'sentinel_connect_retries' => '5',
'sentinel_verify_master' => '0'
]
],
'cache' => [
'frontend' => [
'default' => [
'id_prefix' => 'aaa_',
'backend' => 'Cm_Cache_Backend_Redis',
'backend_options' => [
'server' => 'localhost',
'database' => '0',
'port' => '6379',
'password' => '',
'compress_data' => '1',
'compression_lib' => ''
]
],
'page_cache' => [
'id_prefix' => 'aaa_',
'backend' => 'Cm_Cache_Backend_Redis',
'backend_options' => [
'server' => 'localhost',
'database' => '1',
'port' => '6379',
'password' => '',
'compress_data' => '0',
'compression_lib' => ''
]
]
]
],
军哥, 请问如何处理呀?
|
|