Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

option "open_tcp_nodelay" dont work #559

Open
TimoFrenzel opened this issue May 22, 2024 · 0 comments
Open

option "open_tcp_nodelay" dont work #559

TimoFrenzel opened this issue May 22, 2024 · 0 comments

Comments

@TimoFrenzel
Copy link

TimoFrenzel commented May 22, 2024

Make sure you read Issues Guideline and answer these questions before submitting your issue. Thanks!
(Any non-English issues will be closed immediately.)

  1. Please provide your PHP and Swoole version. (php -v and php --ri swoole)

PHP 8.0.30 (cli) (built: Sep 2 2023 08:04:32) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.30, Copyright (c) Zend Technologies
with Zend OPcache v8.0.30, Copyright (c), by Zend Technologies

swoole

Swoole => enabled
Author =>
Version => 5.0.1
Built => Dec 9 2022 13:13:11
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.1f 31 Mar 2020
dtls => enabled
http2 => enabled
json => enabled
curl-native => enabled
pcre => enabled
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

NAME="Ubuntu"
VERSION="20.04.5 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.5 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

  1. Please provide your Laravel/Lumen version.

Laravel Framework 8.83.27

  1. Which release version of this package are you using?

2.13.0

  1. What did you do? If possible, provide a recipe for reproducing the error.
'server' => [ 'host' => sprintf('/path/to/sockets/sock_%s.sock', \Illuminate\Support\Str::slug(env('APP_NAME'), '_')), 'port' => 0, 'public_path' => base_path('public'), // Determine if to use swoole to respond request for static files 'handle_static_files' => env('SWOOLE_HANDLE_STATIC', true), 'access_log' => env('SWOOLE_HTTP_ACCESS_LOG', false), // You must add --enable-openssl while compiling Swoole // Put `SWOOLE_SOCK_TCP | SWOOLE_SSL` if you want to enable SSL 'socket_type' => SWOOLE_UNIX_STREAM, 'process_type' => SWOOLE_PROCESS, 'options' => [ 'http_compression' => false, 'upload_tmp_dir' => storage_path('swoole'), 'pid_file' => env('SWOOLE_HTTP_PID_FILE', '/var/www/swoole/swoole_http.pid'), 'log_file' => env('SWOOLE_HTTP_LOG_FILE', '/var/www/swoole/swoole_http.log'), 'daemonize' => env('SWOOLE_HTTP_DAEMONIZE', true), // Normally this value should be 1~4 times larger according to your cpu cores. 'reactor_num' => swoole_cpu_num() * 2, 'worker_num' => swoole_cpu_num() * 3, 'task_worker_num' => swoole_cpu_num() * 3, // The data to receive can't be larger than buffer_output_size. 'package_max_length' => 20 * 1024 * 1024, // The data to send can't be larger than buffer_output_size. 'buffer_output_size' => 10 * 1024 * 1024, // Max buffer size for socket connections 'socket_buffer_size' => 128 * 1024 * 1024, // Worker will restart after processing this number of requests 'max_request' => 100, 'task_max_request' => 250, #tcp und queue only 'max_conn' => 5000, // Enable coroutine send 'send_yield' => true, 'enable_coroutine' => true, 'max_coroutine' => 1000, #1000 'task_enable_coroutine' => true, 'task_use_object' => true, 'task_ipc_mode' => 1, // You must add --enable-openssl while compiling Swoole 'ssl_cert_file' => null, 'ssl_key_file' => null, 'open_http_protocol' => true, 'open_http2_protocol' => true, #0 => DEBUG // all the levels of log will be recorded #1 => TRACE #2 => INFO #3 => NOTICE #4 => WARNING #5 => ERROR 'log_level' => env('APP_ENV') == 'production' ? 4 : 0, 'tcp_fastopen' => true, 'open_tcp_keepalive' => false, #true 'open_tcp_nodelay' => false, 'tcp_keepidle' => 3, 'tcp_keepinterval' => 1, 'tcp_keepcount' => 5, ], ] ,

i can switch open_tcp_nodelay to false or true... no changes in logs

  1. What did you expect to see?
    no warnings in log
    WARNING Socket::cork(): set_tcp_nopush(fd=97, ON) failed, Error: Operation not supported[95]

  2. What did you see instead?
    i see warnings in logs
    WARNING Socket::cork(): set_tcp_nopush(fd=97, ON) failed, Error: Operation not supported[95]

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant