hyperf / hyperf/hyperf

[QUESTION] 开启服务监控(metric),出现大量慢速,关闭监控恢复正常

Open
#5,293 0 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

Execute the command and paste the result below.

Command: `uname -a && php -v && composer info | grep hyperf && php --ri swoole`

```bash
Darwin devin-2.local 21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:23 PDT 2021; root:xnu-8019.41.5~1/RELEASE_X86_64 x86_64
PHP 8.1.1 (cli) (built: Dec 21 2021 17:08:32) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.1, Copyright (c) Zend Technologies
Composer is operating slower than normal because you have Xdebug enabled. See https://getcomposer.org/xdebug
friendsofhyperf/cache v3.0.0-rc.16 The cache componen...
friendsofhyperf/closure-command v3.0.0-rc.9 The command compon...
friendsofhyperf/compoships v1.0.0-beta.2 Hyperf relationshi...
friendsofhyperf/confd v3.0.0-rc.9 The confd componen...
friendsofhyperf/exception-event v3.0.0-rc.9 The exception comp...
friendsofhyperf/helpers v3.0.0-rc.17 The commonly used ...
friendsofhyperf/http-client v3.0.0-rc.16 The http client co...
friendsofhyperf/lock v3.0.0-rc.16 The lock component...
friendsofhyperf/macros v3.0.0-rc.17 The commonly used ...
friendsofhyperf/model-morph-addon v1.0.0-beta.3 The Model morph ad...
friendsofhyperf/mysql-grammar-addon v1.0.1 The MySqlGrammar a...
friendsofhyperf/tinker v3.0.0-rc.16 The Powerful REPL ...
hyperf/async-queue v3.0.0-rc.3 A async queue comp...
hyperf/cache v3.0.0-rc.5 A cache component ...
hyperf/circuit-breaker v3.0.0-rc.3 A circuit breaker ...
hyperf/command v3.0.0-rc.7 Command for hyperf
hyperf/config v3.0.0-rc.8 An independent com...
hyperf/config-center v3.0.0-beta.1 The abstraction co...
hyperf/config-etcd v3.0.0-rc.1 An etcd adapter fo...
hyperf/constants v3.0.0-rc.1 A constants compon...
hyperf/context v3.0.0-rc.1 A coroutine contex...
hyperf/contract v3.0.0-rc.10 The contracts of H...
hyperf/coordinator v3.0.0-beta.1 Hyperf Coordinator
hyperf/crontab v3.0.0-rc.8 A crontab componen...
hyperf/database v3.0.0-rc.10 A flexible databas...
hyperf/db-connection v3.0.0-rc.4 A hyperf db connec...
hyperf/devtool v3.0.0-rc.8 A Devtool for Hyperf.
hyperf/di v3.0.0-rc.8 A DI for Hyperf.
hyperf/dispatcher v3.0.0-rc.3 A HTTP Server for ...
hyperf/engine v1.3.4
hyperf/etcd v3.0.0-rc.8 Etcd Client for Hy...
hyperf/event v3.0.0-rc.5 an event manager t...
hyperf/exception-handler v3.0.0-rc.9 Exception handler ...
hyperf/framework v3.0.0-rc.8 A coroutine framew...
hyperf/grpc v3.0.0-rc.5 A GRPC basic libra...
hyperf/grpc-client v3.0.0-rc.8 A GRPC Client for ...
hyperf/grpc-server v3.0.0-rc.5 A GRPC Server for ...
hyperf/guzzle v3.0.0-rc.3 Swoole coroutine h...
hyperf/http-message v3.0.0-rc.8 microservice frame...
hyperf/http-server v3.0.0-rc.10 A HTTP Server for ...
hyperf/load-balancer v3.0.0-rc.4 A load balancer li...
hyperf/logger v3.0.0-rc.3 A logger component...
hyperf/macroable v3.0.0-rc.1 Hyperf Macroable p...
hyperf/metric v3.0.0-rc.8 hyperf metric comp...
hyperf/model-cache v3.0.0-rc.1 A model cache comp...
hyperf/model-listener v3.0.0-rc.1 A model listener f...
hyperf/paginator v3.0.0-rc.10 A paginator compon...
hyperf/pool v3.0.0-rc.3 An independent uni...
hyperf/process v3.0.0-rc.3 A process componen...
hyperf/rate-limit v3.0.0-rc.3 A rate limiter imp...
hyperf/redis v3.0.0-rc.4 A redis component ...
hyperf/rpc v3.0.0-beta.1 A rpc basic librar...
hyperf/rpc-client v3.0.0-rc.8 An abstract rpc se...
hyperf/rpc-multiplex v3.0.0-rc.4 Rpc for multiplexi...
hyperf/rpc-server v3.0.0-rc.4 An abstract rpc se...
hyperf/server v3.0.0-rc.1 A base server libr...
hyperf/testing v3.0.0-rc.1 Testing for hyperf
hyperf/tracer v3.0.0-rc.8 A open tracing sys...
hyperf/translation v3.0.0-rc.3 An independent tra...
hyperf/utils v3.0.0-rc.10 A tools package th...
hyperf/validation v3.0.0-rc.10 hyperf validation
hyperf/watcher v3.0.0-rc.3 Hot reload watcher...

swoole

Swoole => enabled
Author => Swoole Team
Version => 4.8.11
Built => Dec 15 2022 16:43:47
coroutine => enabled with boost asm context
kqueue => enabled
rwlock => enabled
sockets => enabled
openssl => OpenSSL 1.1.1n 15 Mar 2022
dtls => enabled
http2 => enabled
json => enabled
curl-native => enabled
pcre => enabled
c-ares => 1.18.1
zlib => 1.2.11
brotli => E16777225/D16777225
mysqlnd => 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 => 262144 => 262144
```

### Description:
#####开启服务监控(metric),涉及到io产生协程切换的,就会出现大量慢速,关闭监控后恢复正常
image
image
image
image

### 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.