Closed erdong01 closed 4 years ago
我也遇到这个问题了
请上传一个可重现例子到这里。
请上传一个可重现例子到这里。
不清楚要什么例子 就这样使用框架 请求一个空逻辑api请求也是会出现redis断开
我今天把php 升级7.4了 还是会出现redis 隔几分钟断开 php.ini 没有做如何改动
装了Xdebug? 我本地未复现此问题,Swoole不兼容Xdebug,请先关闭Xdebug扩展,然后再试。
没有装xdebug 装了都跑不起来了
我看到你URL上带了XDEBUG_SESSION_START
参数,像是用了Xdebug
。
那是以前fpm模型下的 postman上遗留的没删掉 xdebug扩展都没启用 xdebug扩展启用了swoole会直接报错
redis 扩展版本
redis
Redis Support => enabled
Redis Version => 5.1.1
Available serializers => php, json
Directive => Local Value => Master Value
redis.arrays.algorithm => no value => no value
redis.arrays.auth => no value => no value
redis.arrays.autorehash => 0 => 0
redis.arrays.connecttimeout => 0 => 0
redis.arrays.consistent => 0 => 0
redis.arrays.distributor => no value => no value
redis.arrays.functions => no value => no value
redis.arrays.hosts => no value => no value
redis.arrays.index => 0 => 0
redis.arrays.lazyconnect => 0 => 0
redis.arrays.names => no value => no value
redis.arrays.pconnect => 0 => 0
redis.arrays.previous => no value => no value
redis.arrays.readtimeout => 0 => 0
redis.arrays.retryinterval => 0 => 0
redis.clusters.auth => no value => no value
redis.clusters.cache_slots => 0 => 0
redis.clusters.persistent => 0 => 0
redis.clusters.read_timeout => 0 => 0
redis.clusters.seeds => no value => no value
redis.clusters.timeout => 0 => 0
redis.pconnect.connection_limit => 0 => 0
redis.pconnect.pooling_enabled => 1 => 1
redis.session.lock_expire => 0 => 0
redis.session.lock_retries => 10 => 10
redis.session.lock_wait_time => 2000 => 2000
redis.session.locking_enabled => 0 => 0
我跟你的环境各个版本都一致,但也没有重现。
你执行下php -m
列出所有扩展,然后上传一个可复现问题的代码压缩包到这里吧。
root@ubuntu:/var/www/code/api.laravel# php -m
[PHP Modules]
bcmath
calendar
Core
ctype
curl
date
dba
dom
exif
FFI
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
intl
json
libxml
mbstring
mysqli
mysqlnd
odbc
openssl
pcntl
pcre
PDO
pdo_mysql
PDO_ODBC
Phar
posix
pspell
readline
redis
Reflection
session
shmop
SimpleXML
snmp
soap
sockets
sodium
SPL
standard
swoole
sysvmsg
sysvsem
sysvshm
tidy
tokenizer
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib
[Zend Modules]
Zend OPcache
composer
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"type": "project",
"require": {
"php": ">=7.1.0",
"barryvdh/laravel-cors": "^0.11.0",
"dingo/api": "2.0.0-alpha2",
"elasticquent/elasticquent": "=v1.0.7",
"fideloper/proxy": "~4.0",
"hhxsv5/laravel-s": "~3.5",
"jaeger/phpquery-single": "^0.9.9",
"laravel/framework": "5.5.*",
"laravel/tinker": "~1.0",
"maatwebsite/excel": "^3.1",
"marstm/bean": "^0.0.3",
"overtrue/laravel-wechat": "~4.0",
"tymon/jwt-auth": "dev-develop",
"vinkla/hashids": "v3.3.0",
"yansongda/laravel-pay": "v2.1.0",
"zgldh/qiniu-laravel-storage": "^0.10.0"
},
"require-dev": {
"barryvdh/laravel-ide-helper": "dev-master",
"doctrine/dbal": "^2.9",
"eaglewu/swoole-ide-helper": "dev-master",
"filp/whoops": "~2.0",
"fzaninotto/faker": "~1.4",
"mockery/mockery": "~1.0",
"phpunit/phpunit": "~6.0",
"squizlabs/php_codesniffer": "3.*",
"symfony/thanks": "^1.0"
},
"autoload": {
"classmap": [
"database/seeds",
"database/factories"
],
"psr-4": {
"App\\": "app/"
},
"files": [
"app/Helpers/Functions.php"
]
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"extra": {
"laravel": {
"dont-discover": [
]
}
},
"scripts": {
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate"
],
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover"
]
},
"config": {
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true,
"secure-http": false
},
"repositories": {
"packagist": {
"type": "composer",
"url": "https://mirrors.aliyun.com/composer/"
}
}
}
我搭建框架 请求空控制器 没有如何逻辑代码 隔几分钟就回连接不上redis
Route::get('/', function () {
\Illuminate\Support\Facades\Cache::store('redis')->add('test', "2222322234",60);
$res= \Illuminate\Support\Facades\Cache::store('redis')->get('test');
return $res;
});
这是代码段
放弃了啊
没有重现,目前只有你反馈有问题,新建个项目,上传可重现问题的压缩包吧。
NOAUTH Authentication required. 正常运行过程中,出现了这个异常
第二次在请求
reproducible
code block andsteps