我的一个应用程序突然开始出错:
Fatal error: Uncaught exception 'RedisException' with message 'Redis server went away' in /var/www/_slim/_core/system/generator.001.php:133 Stack trace: #0 /var/www/_slim/_core/system/generator.001.php(133): Redis->auth('77B1BFFBC0378DF...') #1 /var/www/_slim/_core/system/generator.007.php(144): Generator001->r6_redis_start('R') #2 /var/www/_slim/_core/system/generator.007.php(26): Generator007->HarvestRedis() #3 /var/www/_slim/_core/system/generator.shopping.php(14): Generator007->Generator007() #4 /var/www/_slim/_core/system/generator.last.php(43): Generator008->Generator008() #5 /var/www/_slim/site/home/php/index.php(16): GeneratorLast->GeneratorLast() #6 /var/www/index.php(96): Gui->Gui() #7 {main} thrown in /var/www/_slim/_core/system/generator.001.php on line 133
我重新安装redis-server
但到目前为止没有运气.有什么建议?
也许不是具体问题的答案,但可能会帮助那些通过谷歌搜索异常来到这里的新人.
如果您创建一个Redis实例并开始在其上调用方法而不首先通过调用连接到Redis服务器,您也将获得此异常
$redis->connect('localhost')
如果Redis不是本地主机,配置为侦听其他端口,设置密码等,则显然应调整该调用的参数.