Closed zuobee closed 2 years ago
Please show me the code to reproducing the error. Thanks.
it happen in swoft framework, when use RPC services are integrated in Http Server startup
'httpServer' => [
'class' => HttpServer::class,
'port' => env('HTTP_PORT', 18306),
'listener' => [
'rpc' => bean('rpcServer'),
// 'tcp' => bean('tcpServer'),
],
/**
* Add listener serve to the main server
*
* @throws ServerException
*/
protected function addListener(): void
{
foreach ($this->listener as $listener) {
if (!$listener instanceof ServerInterface) {
continue;
}
$host = $listener->getHost();
$port = $listener->getPort();
$type = $listener->getType();
if (!$events = $listener->getOn()) {
throw new ServerException(
'Not add any event handler for the listener server: ' . get_class($listener)
);
}
/* @var CoServer\Port $server */
$server = $this->swooleServer->listen($host, $port, $type);
$server->set($listener->getSetting());
// Bind events to the sub-server
$this->addEvent($server, $events);
// Trigger event
Swoft::trigger(ServerEvent::AFTER_ADDED_LISTENER, $server, $this);
}
}
it happen maybe about 2 times one day error logs
client err
2021-12-12 16:32:15 [error] [swoft] [swoft.process.user.consumer] [tid:1] [cid:4498] [traceid:] trace[StService.php:80] Swoft\Rpc\Client\Exception\RpcClientException
recv:Rpc call failed.code=110 message=Connection timed out interface=Zhoubin\RpcLib\UserInterface method=getUserInfo pool=user.pool version=1.0
server err
[2021-12-12 16:32:12 $72.0] WARNING Server::check_worker_exit_status(): worker(pid=122, id=3) abnormal exit, status=255, signal=0
This means a fatal php error has occurred, please check the php error_log
Please answer these questions before submitting your issue. Thanks!
What did you do? If possible, provide a simple script for reproducing the error.
What did you expect to see?
What did you see instead?
What version of Swoole are you using (show your
php --ri swoole
)?swoole
Swoole => enabled Author => Swoole Team team@swoole.com Version => 4.8.3 Built => Dec 9 2021 01:09:41 coroutine => enabled with boost asm context epoll => enabled eventfd => enabled signalfd => enabled cpu_affinity => enabled spinlock => enabled rwlock => enabled sockets => enabled openssl => OpenSSL 1.1.1d 10 Sep 2019 dtls => enabled http2 => enabled pcre => enabled zlib => 1.2.11 mutex_timedlock => enabled pthread_barrier => enabled futex => 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 => On => On swoole.unixsock_buffer_size => 8388608 => 8388608
uname -a
&php -v
&gcc -v
) ? Linux 565ed2b9cec1 3.10.0-693.2.2.el7.x86_64 #1 SMP Tue Sep 12 22:26:13 UTC 2017 x86_64 GNU/Linux PHP 7.2.34 (cli) (built: Dec 11 2020 10:44:02) ( NTS )Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/8/lto-wrapper OFFLOAD_TARGET_NAMES=nvptx-none OFFLOAD_TARGET_DEFAULT=1 Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Debian 8.3.0-6' --with-bugurl=file:///usr/share/doc/gcc-8/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-8 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 8.3.0 (Debian 8.3.0-6)