Laravel Predis Error while reading line from the server.
问题
Laravel说明文档中的 Redis 发布与订阅案例,命令行运行php artisan redis:subscribe 到60s自动断开并报错
[Predis\Connection\ConnectionException]
Error while reading line from the server. [tcp://127.0.0.1:6379]
解决
在config/database.php
配置文件中,找到redis配置项,添加一行如下
'redis' => [ 'cluster' => false, 'default' => [
'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379),
'database' => 0,
'read_write_timeout' => 0,//new
], ]
原因
据Predis作者在配置文件中说明,因为在底层网络资源上执行读取或写入操作时使用了超时,默认设置了timeout 为60s。
参考
Laravel Predis Error while reading line from the server.的更多相关文章
- laravel redis Error while reading line from the server.
代码运行一段时间后,会报下面的错误. [Predis\Connection\ConnectionException] Error while reading line from the server. ...
- Faster RCNN 运行自己的数据,刚开始正常,后来就报错: Index exceeds matrix dimensions. Error in ori_demo (line 114) boxes_cell{i} = [boxes(:, (1+(i-1)*4):(i*4)), scores(:, i)];
function script_faster_rcnn_demo() close all; clc; clear mex; clear is_valid_handle; % to clear init ...
- make module失败的原因cc1: error: unrecognized command line option “-m64
cc1: error: unrecognized command line option "-m64"cc1: error: unrecognized command line o ...
- linux下安装QT5:error: unrecognized command line option ‘-fuse-ld=gold’
安装qt时在执行./configure时报错:error: unrecognized command line option '-fuse-ld=gold' 这个错误是qt的一个bug. 在装有gol ...
- 编辑sass报错:error style.scss (Line 3: Invalid GBK character "\xE5")解决办法
cmd.exe /D /C call C:/Ruby23-x64/bin/scss.bat --no-cache --update header.scss:header.css error heade ...
- 新部署tomcat,An error occurred at line: [1] index_jsp.java
环境: centos6.5 32位 oracle jdk 1.8 tomcat 7 问题: yum install tomcat后,返回如下错误: [root@centos]~# curl -v ht ...
- cc1plus.exe: error: unrecognized command line option "-fno-keep-inline-dllexport "
在Windows环境下的控制台上,通过qmake指令编译Qt程序时,出现 cc1plus.exe: error: unrecognized command line option "-fno ...
- Solve Error : Undefined function or variable ‘setInitialWorkingFolder’. Error in matlabrc (line 197)
When compile program using Visual Studio 2015, Matlab 2016b, and OpenCV 3.1.0, one might get the err ...
- 编译openwrt时报错:fstools-2018-01-02-11efbf3b/libfstools/overlay.c: At top level: cc1: error: unrecognized command line option '-Wno-format-truncation' [-Werror]
1. 详细错误信息 [ 11%] Building C object CMakeFiles/fstools.dir/libfstools/overlay.c.o/home/jello/openwrt/ ...
随机推荐
- [转]Sql Server 给表与字段添加描述
/* 在SQL语句中通过系统存储过sp_addextendedproperty可为表字段添加上动态的说明(备注)下面是SQL SERVER帮助文档中对sp_addextendedproperty存储过 ...
- java之final关键字
final关键字(可以读不可以写.只读) 1.final的变量的值不能够被改变 ①.final的成员变量 ②.final的局部变量(形参) //意思是“实参”一旦传进我的方法里面,就不允许改变 2.f ...
- WIN7 64位如何添加网络打印机
http://wenku.baidu.com/view/2d64bef0f61fb7360b4c65ac.html 该文介绍的比较详细,并且我按照他的方法,确实安装成功了.
- Reactor模式与Proactor模式
该文章总结了网上资源对这两种模式的描述 原文地址:http://www.cnblogs.com/dawen/archive/2011/05/18/2050358.html 1.标准定义 两种I/O多路 ...
- NET实现微信分享和获取openid
VS2010开发,MVC3架构. 通过调用微信官方接口实现获取openid,和分享好友功能,实现获取signature和jsapi_ticket,并在服务端进行缓存AccessToken和jsapi_ ...
- css hack 整理
<ul> <li>"_" ------ IE6</li> <li>"-" ------ IE6</li&g ...
- visual studio 2012 has stopped working
I had similar problem which was resolved by taking two steps : 1A. DELETE THE REGISTRY KEY : 32-bit ...
- 装B必备词汇
这个页面用来记录遇到的所有高大上的词汇,本词汇集仅限于装B圈交流和讨论. 一致性 hash 算法(consistent hashing) http://blog.csdn.net/sparkliang ...
- C# 类型基础
引言 本文之初的目的是讲述设计模式中的 Prototype(原型)模式,但是如果想较清楚地弄明白这个模式,需要了解对象克隆(Object Clone),Clone其实也就是对象复制.复制又分为了浅度复 ...
- VirtualBox Bridged 无线网卡
启动虚拟机后选择右键单击右下角的网络链接图标, 弹出的窗口中选择Bridged Adapter, wlan0 然后选择OK 查看virtual Box主页面中setting中网络的配置是否和刚才一 ...