Skip to content

kafka 投递消息有时失败,成功就报下面的错 #9

@CXW0504

Description

@CXW0504

thrown in vendor/longlang/phpkafka/src/Socket/SwooleSocket.php on line 128
[2021-11-26 00:47:59 *33968.3] ERROR php_swoole_server_rshutdown (ERRNO 503): Fatal error: Uncaught longlang\phpkafka\Exception\SocketException: Could not recv data from stream, [0] in vendor/longlang/phpkafka/src/Socket/SwooleSocket.php:128
Stack trace:
#0 vendor/longlang/phpkafka/src/Client/SwooleClient.php(135): longlang\phpkafka\Socket\SwooleSocket->recv(4, -1)
#1 {main}
thrown in vendor/longlang/phpkafka/src/Socket/SwooleSocket.php on line 128
[2021-11-26 00:47:59 @33968.0] WARNING ~Channel (ERRNO 10003): channel is destroyed, 1 consumers will be discarded
[2021-11-26 00:47:59 $33964.0] WARNING swManager_check_exit_status: worker#3[pid=33968] abnormal exit, status=255, signal=0

环境swool信息
bash-5.0# php --ri swoole

swoole

Swoole => enabled
Author => Swoole Team team@swoole.com
Version => 4.5.5
Built => Oct 14 2020 13:17:03
coroutine => enabled
epoll => enabled
eventfd => enabled
signalfd => enabled
spinlock => enabled
rwlock => enabled
openssl => OpenSSL 1.1.1g 21 Apr 2020
http2 => enabled
pcre => enabled
zlib => 1.2.11
mutex_timedlock => enabled
pthread_barrier => enabled
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 => 8388608 => 8388608

composer info:

bash-5.0# composer info
casbin/casbin v3.18.4 a powerful and efficient open-source access control library for php projects.
casbin/psr3-bridge v1.3.0 This library provides a PSR-3 compliant bridge for Casbin Logger.
chdemko/sorted-collections 1.0.5 Sorted Collections for PHP >= 5.5
composer/semver 3.2.6 Semver library that offers utilities, version constraint parsing and validation.
composer/xdebug-handler 2.0.2 Restarts a process without Xdebug.
doctrine/annotations 1.13.2 Docblock Annotations Parser
doctrine/inflector 2.0.4 PHP Doctrine Inflector is a small library that can perform string manipulations with regard...
doctrine/instantiator 1.4.0 A small, lightweight utility to instantiate objects in PHP without invoking their constructors
doctrine/lexer 1.2.1 PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.
donjan-deng/hyperf-casbin 3.18.0 An authorization library that supports access control models like ACL, RBAC, ABAC in hyperf.
egulias/email-validator 3.1.2 A library for validating emails against several RFCs
elasticsearch/elasticsearch v7.15.0 PHP Client for Elasticsearch
exussum12/xxhash 1.3 xxHash implementation in Pure PHP
ezimuel/guzzlestreams 3.0.1 Fork of guzzle/streams (abandoned) to be used with elasticsearch-php
ezimuel/ringphp 1.1.2 Fork of guzzle/RingPHP (abandoned) to be used with elasticsearch-php
fig/http-message-util 1.1.5 Utility classes and constants for use with PSR-7 (psr/http-message)
firstphp/dingtalk 1.2.2 钉钉开发组件 for hyperf
friendsofphp/php-cs-fixer v3.3.2 A tool to automatically fix PHP code style
google/crc32 v0.1.0 Various CRC32 implementations
graham-campbell/result-type v1.0.3 An Implementation Of The Result Type
guzzlehttp/guzzle 7.4.0 Guzzle is a PHP HTTP client library
guzzlehttp/promises 1.5.1 Guzzle promises library
guzzlehttp/psr7 2.1.0 PSR-7 message implementation that also provides common utility methods
hamcrest/hamcrest-php v2.0.1 This is the PHP port of Hamcrest Matchers
hyperf/amqp v2.2.14 A amqplib for hyperf.
hyperf/async-queue v2.2.8 A async queue component for hyperf.
hyperf/cache v2.2.15 A cache component for hyperf.
hyperf/command v2.2.9 Command for hyperf
hyperf/config v2.2.0 An independent component that provides configuration container.
hyperf/constants v2.2.15 A constants component for hyperf.
hyperf/contract v2.2.8 The contracts of Hyperf.
hyperf/crontab v2.2.10 A crontab component for Hyperf.
hyperf/database v2.2.13 A flexible database library.
hyperf/db-connection v2.2.0 A hyperf db connection handler for hyperf/database.
hyperf/devtool v2.2.5 A Devtool for Hyperf.
hyperf/di v2.2.16 A DI for Hyperf.
hyperf/dispatcher v2.2.0 A HTTP Server for Hyperf.
hyperf/elasticsearch v2.2.0 Elasticsearch client for hyperf
hyperf/engine v1.1.6
hyperf/event v2.2.0 an event manager that implements PSR-14.
hyperf/exception-handler v2.2.0 Exception handler for hyperf
hyperf/framework v2.2.14 A coroutine framework that focuses on hyperspeed and flexible, specifically use for build m...
hyperf/guzzle v2.2.0 Swoole coroutine handler for guzzle
hyperf/http-message v2.2.12 microservice framework base on swoole
hyperf/http-server v2.2.13 A HTTP Server for Hyperf.
hyperf/ide-helper v2.2.5 IDE help files for Hyperf.
hyperf/json-rpc v2.2.14 A JSON RPC component for Hyperf RPC Server or Client.
hyperf/kafka v2.2.14 A kafka client for Hyperf
hyperf/load-balancer v2.2.0 A load balancer library for Hyperf.
hyperf/logger v2.2.14 A logger component for hyperf.
hyperf/macroable v2.2.13 Hyperf Macroable package which come from illuminate/macroable
hyperf/memory v2.2.0 An independent component that use to operate and manage memory.
hyperf/model-cache v2.2.0 A model cache component for hyperf.
hyperf/model-listener v2.2.14 A model listener for Hyperf.
hyperf/pool v2.2.0 An independent universal connection pool component.
hyperf/process v2.2.3 A process component for hyperf.
hyperf/redis v2.2.9 A redis component for hyperf.
hyperf/rpc v2.2.0 A rpc basic library for Hyperf.
hyperf/rpc-client v2.2.16 An abstract rpc server component for Hyperf.
hyperf/rpc-server v2.2.0 An abstract rpc server component for Hyperf.
hyperf/server v2.2.14.1 A base server library for Hyperf.
hyperf/session v2.2.7 A session library
hyperf/testing v2.2.11 Testing for hyperf
hyperf/tracer v2.2.9 A open tracing system implemented for Hyperf or other coroutine framework
hyperf/translation v2.2.13 An independent translation component, forked by illuminate/translation.
hyperf/utils v2.2.15 A tools package that could help developer solved the problem quickly.
hyperf/validation v2.2.13 hyperf validation
jcchavezs/zipkin-opentracing 1.0.0 A Zipkin bridge with OpenTracing
laminas/laminas-mime 2.9.1 Create and parse MIME messages and parts
laminas/laminas-stdlib 3.6.1 SPL extensions, array utilities, error handlers, and more
longlang/phpkafka v1.2.0 A kafka client. Support php-fpm and Swoole.
markrogoyski/math-php v2.4.0 Math Library for PHP. Features descriptive statistics and regressions; Continuous and discr...
mockery/mockery 1.4.4 Mockery is a simple yet flexible PHP mock object framework
monolog/monolog 2.3.5 Sends your logs to files, sockets, inboxes, databases and various web services
myclabs/deep-copy 1.10.2 Create deep copies (clones) of your objects
nesbot/carbon 2.54.0 An API extension for DateTime that supports 281 different languages.
nikic/fast-route v1.3.0 Fast request router for PHP
nikic/php-parser v4.13.1 A PHP parser written in PHP
opentracing/opentracing 1.0.1 OpenTracing API for PHP
openzipkin/zipkin 2.0.2 A Zipkin instrumentation for PHP
paragonie/constant_time_encoding v2.4.0 Constant-time Implementations of RFC 4648 Encoding (Base-64, Base-32, Base-16)
paragonie/random_compat v9.99.100 PHP 5.x polyfill for random_bytes() and random_int() from PHP 7
phar-io/manifest 2.0.3 Component for reading phar.io manifest information from a PHP Archive (PHAR)
phar-io/version 3.1.0 Library for handling version information and constraints
php-amqplib/php-amqplib v3.1.0 Formerly videlalvaro/php-amqplib. This library is a pure PHP implementation of the AMQP pr...
php-cs-fixer/diff v2.0.2 sebastian/diff v3 backport support for PHP 5.6+
php-di/phpdoc-reader 2.2.1 PhpDocReader parses @var and @param values in PHP docblocks (supports namespaced class name...
phpdocumentor/reflection-common 2.2.0 Common reflection classes used by phpdocumentor to reflect the code structure
phpdocumentor/reflection-docblock 5.3.0 With this component, a library can provide support for annotations via DocBlocks or otherwi...
phpdocumentor/type-resolver 1.5.1 A PSR-5 based resolver of Class names, Types and Structural Element Names
phpoption/phpoption 1.8.0 Option Type for PHP
phpseclib/phpseclib 3.0.11 PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509...
phpspec/prophecy 1.14.0 Highly opinionated mocking framework for PHP 5.3+
phpstan/phpstan 0.12.99 PHPStan - PHP Static Analysis Tool
phpunit/php-code-coverage 9.2.8 Library that provides collection, processing, and rendering functionality for PHP code cove...
phpunit/php-file-iterator 3.0.5 FilterIterator implementation that filters files based on a list of suffixes.
phpunit/php-invoker 3.1.1 Invoke callables with a timeout
phpunit/php-text-template 2.0.4 Simple template engine.
phpunit/php-timer 5.0.3 Utility class for timing
phpunit/phpunit 9.5.10 The PHP Unit Testing framework.
psr/cache 1.0.1 Common interface for caching libraries
psr/container 2.0.2 Common Container Interface (PHP FIG PSR-11)
psr/event-dispatcher 1.0.0 Standard interfaces for event handling.
psr/http-client 1.0.1 Common interface for HTTP clients
psr/http-factory 1.0.1 Common interfaces for PSR-7 HTTP message factories
psr/http-message 1.0.1 Common interface for HTTP messages
psr/http-server-handler 1.0.1 Common interface for HTTP server-side request handler
psr/http-server-middleware 1.0.1 Common interface for HTTP server-side middleware
psr/log 1.1.4 Common interface for logging libraries
psr/simple-cache 1.0.1 Common interfaces for simple caching
ralouphie/getallheaders 3.0.3 A polyfill for getallheaders.
react/promise v2.8.0 A lightweight implementation of CommonJS Promises/A for PHP
s1lentium/iptools v1.1.1 PHP Library for manipulating network addresses (IPv4 and IPv6)
sebastian/cli-parser 1.0.1 Library for parsing CLI options
sebastian/code-unit 1.0.8 Collection of value objects that represent the PHP code units
sebastian/code-unit-reverse-lookup 2.0.3 Looks up which function or method a line of code belongs to
sebastian/comparator 4.0.6 Provides the functionality to compare PHP values for equality
sebastian/complexity 2.0.2 Library for calculating the complexity of PHP code units
sebastian/diff 4.0.4 Diff implementation
sebastian/environment 5.1.3 Provides functionality to handle HHVM/PHP environments
sebastian/exporter 4.0.4 Provides the functionality to export PHP variables for visualization
sebastian/global-state 5.0.3 Snapshotting of global state
sebastian/lines-of-code 1.0.3 Library for counting the lines of code in PHP source code
sebastian/object-enumerator 4.0.4 Traverses array structures and object graphs to enumerate all referenced objects
sebastian/object-reflector 2.0.4 Allows reflection of object attributes, including inherited and non-public ones
sebastian/recursion-context 4.0.4 Provides functionality to recursively process PHP variables
sebastian/resource-operations 3.0.3 Provides a list of PHP built-in functions that operate on resources
sebastian/type 2.3.4 Collection of value objects that represent the types of the PHP type system
sebastian/version 3.0.2 Library that helps with managing the version number of Git-hosted PHP projects
swoole/ide-helper 4.8.1 IDE help files for Swoole.
symfony/cache v5.3.10 Provides an extended PSR-6, PSR-16 (and tags) implementation
symfony/cache-contracts v2.4.0 Generic abstractions related to caching
symfony/console v5.3.10 Eases the creation of beautiful and testable command line interfaces
symfony/deprecation-contracts v2.4.0 A generic function and convention to trigger deprecation notices
symfony/event-dispatcher v5.3.7 Provides tools that allow your application components to communicate with each other by dis...
symfony/event-dispatcher-contracts v2.4.0 Generic abstractions related to dispatching event
symfony/expression-language v5.3.7 Provides an engine that can compile and evaluate expressions
symfony/filesystem v5.3.4 Provides basic utilities for the filesystem
symfony/finder v5.3.7 Finds files and directories via an intuitive fluent interface
symfony/options-resolver v5.3.7 Provides an improved replacement for the array_replace PHP function
symfony/polyfill-ctype v1.23.0 Symfony polyfill for ctype functions
symfony/polyfill-intl-grapheme v1.23.1 Symfony polyfill for intl's grapheme_* functions
symfony/polyfill-intl-idn v1.23.0 Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions
symfony/polyfill-intl-normalizer v1.23.0 Symfony polyfill for intl's Normalizer class and related functions
symfony/polyfill-mbstring v1.23.1 Symfony polyfill for the Mbstring extension
symfony/polyfill-php72 v1.23.0 Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions
symfony/polyfill-php73 v1.23.0 Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions
symfony/polyfill-php80 v1.23.1 Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions
symfony/polyfill-php81 v1.23.0 Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions
symfony/process v5.3.7 Executes commands in sub-processes
symfony/service-contracts v1.1.2 Generic abstractions related to writing services
symfony/stopwatch v5.3.4 Provides a way to profile code
symfony/string v5.3.10 Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grap...
symfony/translation v5.3.10 Provides tools to internationalize your application
symfony/translation-contracts v2.4.0 Generic abstractions related to translation
symfony/var-exporter v5.3.8 Allows exporting any serializable PHP data structure to plain PHP code
theseer/tokenizer 1.2.1 A small library for converting tokenized PHP source code into XML and potentially other for...
vlucas/phpdotenv v5.4.0 Loads environment variables from .env to getenv(), $_ENV and $_SERVER automagically.
webmozart/assert 1.10.0 Assertions to validate method input/output with nice error messages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions