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/ ...
随机推荐
- Volley自定义Request及使用单例封装RequestQueue
一.自定义Request Volley的所有的请求的超类型是Resuest,所有我们常用的请求都是这个类的子类,那么我们自定义View肯定也是基于这个类的. 案例: package com.zhy.v ...
- [论文笔记] Legacy Application Migration to the Cloud: Practicability and Methodology (SERVICES, 2012)
Quang Hieu Vu, Rasool Asal: Legacy Application Migration to the Cloud: Practicability and Methodolog ...
- IOS UITableView下拉刷新和上拉加载功能的实现
在IOS开发中UITableView是非常常用的一个功能,而在使用UITableView的时候我们经常要用到下拉刷新和上拉加载的功能,今天花时间实现了简单的UITableView的下拉刷新和上拉加载功 ...
- Oracle Purchasing QUESTIONS AND ANSWERS
Topic Summary Topic: CORRECTIONS: Corrections Topic: DELIVER: Receiving Delivery Topic: DROPSHIP: Dr ...
- toad 常用快捷键与配置
F8 调出以前执行的sql命令 F9 执行全部sql Ctrl+. 补全table_name Ctrl+t 补全table_name,或者显示字段 alt+ 箭头上下 看sql history Ctr ...
- 【Android】Activity生命周期(亲测)
测试手机:Nexus 5 系统:4.4 一.测试 测试代码: package com.example.androidalarm; import android.app.Activity; impo ...
- mysql中替换字符串(正则) 模糊
例如: abcd(efg)hijk 替换之后是abcdhijk , name)),''); 执行之后,报错:Truncated incorrect DOUBLE value解决办法,经过查询发现是co ...
- Django Push HTTP Response to users
Django Push HTTP Response to users I currently have a very simple web application written in Django, ...
- C#基础总结之二循环控制-运算符
#region 第二天 作业2 从键盘上输入三个数,用if语句和逻辑表达式把最小数找出来. //需要:控制台输入 三个变量(a,b,c)判断这三个数其中一个最小的值 打印输出 //Console.Wr ...
- ruby -- 基础学习(二) 外键配置实现级联删除
该系列学习基于rails4.0 数据表:admins (id, name, address), articles (id, admin_id, title) admin_id 是表articles中的 ...