1

我在我的服务器上安装了 redis 对象缓存,然后使用这个插件来刷新缓存......这对我来说工作了 5 到 6 天......之后。状态未连接操作系统显示....我也在使用 fastcgi 缓存。但是,从 5 天开始,两者都在工作......今天我在重做缓存时遇到了这个错误。错误是:

状态:未连接

客户端:PhpRedis (v3.1.6)

投递:有效

连接异常:Redis 服务器消失

(Redis 异常)

Redis 扩展:3.1.6

Predis 客户端:1.1.1

PHP版本:7.2.10-0ubuntu0.18.04.1

多站点:否

全局前缀:“wp_”

博客前缀:“wp_”

WP_CACHE_KEY_SALT:“domain.com”

全局组:["blog-details","blog-id-cache","blog-lookup","global-posts","networks","rss","sites","site-details","site -lookup","site-options","site-transient","users","useremail","userlogins","usermeta","user_meta","userslugs"] 忽略的组:["counts","plugins ","blog-details","blog-id-cache","blog-lookup","global-posts","networks","rss","sites","site-details","site-lookup ","site-options","site-transient","users","useremail","userlogins","usermeta","user_meta","userslugs","themes"] 下降:

advanced-cache.php v by Redis Object Cache Drop-In v1.4.1 by Till Krüss Plugins: Ads.txt Manager v1.1 by 10up (Active) Advanced Ads v1.11.2 by Thomas Maier (Active) Autoptimize v2.4.4 by Frank Goossens (futtta) (Active) EWWW Image Optimizer v4.6.3 by Exactly WWW (Active) Idblog Core v1.1.5 by Gian Mokhammad R (Active) Lazy Load by WP Rocket v2.0.3.2 by WP Rocket (Active) Nginx Cache v1 .0.4 by Till Krüss (Active) Redis Object Cache v1.4.1 by Till Krüss (Active) 相关文章 v5.12.88 by iLen (Active) WP-Optimize v2.2.12 by David Anderson, Ruhani Rabin, Team Updraft (Active) Yoast SEO Yoast 团队的 v9.6(主动)

4

1 回答 1

1

我找到了答案.. 我的 nginx 服务器上的一些软件已经过时了,为此我运行了一些命令。

sudo apt update

sudo apt upgrade

在此之后,您需要编辑 redis 配置文件。在我的情况下,文件位于sudo nano /etc/redis/redis.conf

在这里你必须确认你已经替换#maxmemory

maxmemory 128mb
maxmemory-policy allkeys-lfu

然后使用重新启动redis和php

sudo service redis-server restart
sudo service php7.2-fpm restart

然后使用下面给出的代码进行测试:

redis-cli
ping
set test "It's working"
get test

这将显示结果"it's working"

现在使用命令exit退出

恭喜,问题解决

于 2019-02-13T05:12:17.830 回答