hyperf / hyperf/hyperf

[BUG] 升级Hyperf3后 MQ 问题

Open
#5,516 13 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
PHP
Stars
6.9k
Forks
1.3k
Avg merge
4h 21m
Merged PRs (30d)
4

Description

```bash
Linux 45b94f7b1a8b 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 Linux
PHP 8.0.13 (cli) (built: Nov 20 2021 07:13:05) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.13, Copyright (c) Zend Technologies
with Zend OPcache v8.0.13, Copyright (c), by Zend Technologies
96qbhy/hyperf-auth v3.0.1 hyperf 的 auth 组件
alapi/hyperf-meilisearch 3.0.0 meilisearch for hyperf php
friendsofhyperf/lock v3.0.14 The lock component for Hyperf.
hyperf/amqp v3.0.3 A amqplib for hyperf.
hyperf/async-queue v3.0.9 A async queue component for hyperf.
hyperf/cache v3.0.0-rc.17 A cache component for hyperf.
hyperf/command v3.0.9 Command for hyperf
hyperf/config v3.0.0-rc.8 An independent component that provides configuration container.
hyperf/config-aliyun-acm v3.0.8 An aliyun acm adapter for Hyperf config component.
hyperf/config-center v3.0.10 The abstraction component of config center
hyperf/config-nacos v3.0.7 A nacos adapter for config center component.
hyperf/constants v3.0.0 A constants component for hyperf.
hyperf/consul v3.0.0 A Consul Client for Hyperf.
hyperf/context v3.0.0 A coroutine context library.
hyperf/contract v3.0.0 The contracts of Hyperf.
hyperf/coordinator v3.0.5 Hyperf Coordinator
hyperf/crontab v3.0.9 A crontab component for Hyperf.
hyperf/database v3.0.8 A flexible database library.
hyperf/db-connection v3.0.10 A hyperf db connection handler for hyperf/database.
hyperf/di v3.0.8 A DI for Hyperf.
hyperf/dispatcher v3.0.0 A HTTP Server for Hyperf.
hyperf/elasticsearch v3.0.0 Elasticsearch client for hyperf
hyperf/engine v2.4.0 Coroutine engine provided by swoole.
hyperf/engine-contract v1.4.0 Contract for Coroutine Engine
hyperf/event v3.0.0 an event manager that implements PSR-14.
hyperf/exception-handler v3.0.0 Exception handler for hyperf
hyperf/filesystem v3.0.0 flysystem integration for hyperf
hyperf/framework v3.0.0 A coroutine framework that focuses on hyperspeed and flexible, specifically use for build microservices and middlewares.
hyperf/guzzle v3.0.10 Swoole coroutine handler for guzzle
hyperf/http-message v3.0.1 microservice framework base on swoole
hyperf/http-server v3.0.10 A HTTP Server for Hyperf.
hyperf/json-rpc v3.0.0 A JSON RPC component for Hyperf RPC Server or Client.
hyperf/load-balancer v3.0.0 A load balancer library for Hyperf.
hyperf/logger v3.0.0 A logger component for hyperf.
hyperf/macroable v3.0.0 Hyperf Macroable package which come from illuminate/macroable
hyperf/memory v3.0.0 An independent component that use to operate and manage memory.
hyperf/model-cache v3.0.3 A model cache component for hyperf.
hyperf/model-listener v3.0.0 A model listener for Hyperf.
hyperf/nacos v3.0.7 Nacos SDK
hyperf/paginator v3.0.7 A paginator component for hyperf.
hyperf/pool v3.0.0 An independent universal connection pool component.
hyperf/process v3.0.9 A process component for hyperf.
hyperf/redis v3.0.5 A redis component for hyperf.
hyperf/resource v3.0.0 A api resource component for hyperf.
hyperf/rpc v3.0.1 A rpc basic library for Hyperf.
hyperf/rpc-client v3.0.0 An abstract rpc server component for Hyperf.
hyperf/scout v3.0.0 Hyperf Scout provides a driver based solution to searching your Eloquent models. Inspired By Laravel Scout.
hyperf/server v3.0.8 A base server library for Hyperf.
hyperf/service-governance v3.0.0 A service governance component for Hyperf.
hyperf/service-governance-nacos v3.0.8 A nacos adapter for service governance.
hyperf/signal v3.0.1 A signal library for Hyperf.
hyperf/snowflake v3.0.0 A snowflake library
hyperf/translation v3.0.0 An independent translation component, forked by illuminate/translation.
hyperf/utils v3.0.9 A tools package that could help developer solved the problem quickly.
hyperf/validation v3.0.0 hyperf validation
yansongda/hyperf-pay v1.2.1 可能是基于 hyperf 的最优雅的支付宝、微信、银联支付 SDK 了

swoole

Swoole => enabled
Author => Swoole Team
Version => 5.0.2
Built => Mar 4 2023 15:42:27
coroutine => enabled with boost asm context
epoll => enabled
eventfd => enabled
signalfd => enabled
spinlock => enabled
rwlock => enabled
openssl => OpenSSL 1.1.1o 3 May 2022
dtls => enabled
http2 => enabled
json => enabled
curl-native => enabled
pcre => enabled
zlib => 1.2.12
mutex_timedlock => enabled
pthread_barrier => enabled
async_redis => enabled

Directive => Local Value => Master Value
swoole.enable_coroutine => On => On
swoole.enable_library => On => On
swoole.enable_preemptive_scheduler => Off => Off
swoole.display_errors => On => On
swoole.use_shortname => Off => Off
swoole.unixsock_buffer_size => 8388608 => 8388608
```

### Description:
升级 Hyperf3后, MQ运行了一段时间会出现 `Timeout waiting on channel ` ,重启hyperf后可以正常连接,但是过了一段时间又会出现

```
2023-03-11T17:45:33.346362633Z [WARNING] PhpAmqpLib\Exception\AMQPTimeoutException: Timeout waiting on channel in /opt/www/vendor/hyperf/amqp/src/AMQPConnection.php:265
2023-03-11T17:45:33.346399324Z Stack trace:
2023-03-11T17:45:33.346404512Z #0 /opt/www/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Channel/AbstractChannel.php(235): Hyperf\Amqp\AMQPConnection->wait_channel()
2023-03-11T17:45:33.346409507Z #1 /opt/www/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Channel/AbstractChannel.php(352): PhpAmqpLib\Channel\AbstractChannel->next_frame()
2023-03-11T17:45:33.346413952Z #2 /opt/www/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Connection/AbstractConnection.php(761): PhpAmqpLib\Channel\AbstractChannel->wait()
2023-03-11T17:45:33.346418907Z #3 /opt/www/vendor/hyperf/amqp/src/AMQPConnection.php(173): PhpAmqpLib\Connection\AbstractConnection->close()
2023-03-11T17:45:33.346423175Z #4 /opt/www/vendor/hyperf/amqp/src/AMQPConnection.php(284): Hyperf\Amqp\AMQPConnection->close()
2023-03-11T17:45:33.346427295Z #5 /opt/www/vendor/hyperf/utils/src/Coroutine.php(67): Hyperf\Amqp\AMQPConnection->Hyperf\Amqp\{closure}()
2023-03-11T17:45:33.346431445Z #6 {main}
```

### Steps To Reproduce:

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.