From 2f1c9d1d48fc167703ea8f51db1993d9b2635001 Mon Sep 17 00:00:00 2001 From: NathanFreeman <1056159381@qq.com> Date: Sun, 27 Oct 2024 21:49:37 +0800 Subject: [PATCH] update swoole version to 5.1.5 --- frameworks/PHP/swoole/10-opcache.ini | 3 ++- frameworks/PHP/swoole/swoole-async-mysql.dockerfile | 7 +++---- frameworks/PHP/swoole/swoole-async-postgres.dockerfile | 7 +++---- frameworks/PHP/swoole/swoole-server.php | 3 ++- frameworks/PHP/swoole/swoole-sync-mysql.dockerfile | 7 +++---- frameworks/PHP/swoole/swoole-sync-postgres.dockerfile | 7 +++---- 6 files changed, 16 insertions(+), 18 deletions(-) diff --git a/frameworks/PHP/swoole/10-opcache.ini b/frameworks/PHP/swoole/10-opcache.ini index 3e65df6b191..bc77a43761e 100644 --- a/frameworks/PHP/swoole/10-opcache.ini +++ b/frameworks/PHP/swoole/10-opcache.ini @@ -6,4 +6,5 @@ opcache.save_comments=0 opcache.enable_file_override=1 opcache.huge_code_pages=1 opcache.jit_buffer_size=128M -opcache.jit=1225 +mysqlnd.collect_statistics = Off +opcache.jit=tracing diff --git a/frameworks/PHP/swoole/swoole-async-mysql.dockerfile b/frameworks/PHP/swoole/swoole-async-mysql.dockerfile index 9e5e1882565..786f80c88cd 100644 --- a/frameworks/PHP/swoole/swoole-async-mysql.dockerfile +++ b/frameworks/PHP/swoole/swoole-async-mysql.dockerfile @@ -1,6 +1,6 @@ FROM ubuntu:24.04 -ENV SWOOLE_VERSION 5.1.4 +ENV SWOOLE_VERSION 5.1.5 ENV ENABLE_COROUTINE 1 ENV CPU_MULTIPLES 1 ENV DATABASE_DRIVER mysql @@ -16,11 +16,10 @@ RUN apt update -yqq > /dev/null \ && cd /tmp/swoole-src-${SWOOLE_VERSION} \ && phpize > /dev/null \ && ./configure > /dev/null \ - && make -j8 > /dev/null \ + && make -j "$(nproc)" > /dev/null \ && make install > /dev/null \ && echo "extension=swoole.so" > /etc/php/8.3/cli/conf.d/50-swoole.ini \ - && echo "memory_limit=1024M" >> /etc/php/8.3/cli/php.ini \ - && php -m + && echo "memory_limit=1024M" >> /etc/php/8.3/cli/php.ini WORKDIR /swoole diff --git a/frameworks/PHP/swoole/swoole-async-postgres.dockerfile b/frameworks/PHP/swoole/swoole-async-postgres.dockerfile index d431e125b3b..b658f569f0e 100644 --- a/frameworks/PHP/swoole/swoole-async-postgres.dockerfile +++ b/frameworks/PHP/swoole/swoole-async-postgres.dockerfile @@ -1,6 +1,6 @@ FROM ubuntu:24.04 -ENV SWOOLE_VERSION 5.1.4 +ENV SWOOLE_VERSION 5.1.5 ENV ENABLE_COROUTINE 1 ENV CPU_MULTIPLES 1 ENV DATABASE_DRIVER pgsql @@ -16,11 +16,10 @@ RUN apt update -yqq > /dev/null \ && cd /tmp/swoole-src-${SWOOLE_VERSION} \ && phpize > /dev/null \ && ./configure --enable-swoole-pgsql > /dev/null \ - && make -j8 > /dev/null \ + && make -j "$(nproc)" > /dev/null \ && make install > /dev/null \ && echo "extension=swoole.so" > /etc/php/8.3/cli/conf.d/50-swoole.ini \ - && echo "memory_limit=1024M" >> /etc/php/8.3/cli/php.ini \ - && php -m + && echo "memory_limit=1024M" >> /etc/php/8.3/cli/php.ini WORKDIR /swoole diff --git a/frameworks/PHP/swoole/swoole-server.php b/frameworks/PHP/swoole/swoole-server.php index 13050d75ebb..38a4152476f 100644 --- a/frameworks/PHP/swoole/swoole-server.php +++ b/frameworks/PHP/swoole/swoole-server.php @@ -12,7 +12,8 @@ 'worker_num' => swoole_cpu_num() * ((int) getenv('CPU_MULTIPLES')), 'log_file' => '/dev/null', 'enable_coroutine' => $enableCoroutine, - 'enable_reuse_port' => true + 'enable_reuse_port' => true, + 'http_compression' => false ]; if ($enableCoroutine) { diff --git a/frameworks/PHP/swoole/swoole-sync-mysql.dockerfile b/frameworks/PHP/swoole/swoole-sync-mysql.dockerfile index c35d26cdc81..86304d151fc 100644 --- a/frameworks/PHP/swoole/swoole-sync-mysql.dockerfile +++ b/frameworks/PHP/swoole/swoole-sync-mysql.dockerfile @@ -1,6 +1,6 @@ FROM ubuntu:24.04 -ENV SWOOLE_VERSION 5.1.4 +ENV SWOOLE_VERSION 5.1.5 ENV ENABLE_COROUTINE 0 ENV CPU_MULTIPLES 1 ENV DATABASE_DRIVER mysql @@ -16,11 +16,10 @@ RUN apt update -yqq > /dev/null \ && cd /tmp/swoole-src-${SWOOLE_VERSION} \ && phpize > /dev/null \ && ./configure > /dev/null \ - && make -j8 > /dev/null \ + && make -j "$(nproc)" > /dev/null \ && make install > /dev/null \ && echo "extension=swoole.so" > /etc/php/8.3/cli/conf.d/50-swoole.ini \ - && echo "memory_limit=1024M" >> /etc/php/8.3/cli/php.ini \ - && php -m + && echo "memory_limit=1024M" >> /etc/php/8.3/cli/php.ini WORKDIR /swoole diff --git a/frameworks/PHP/swoole/swoole-sync-postgres.dockerfile b/frameworks/PHP/swoole/swoole-sync-postgres.dockerfile index a2661c7c010..8054b66912b 100644 --- a/frameworks/PHP/swoole/swoole-sync-postgres.dockerfile +++ b/frameworks/PHP/swoole/swoole-sync-postgres.dockerfile @@ -1,6 +1,6 @@ FROM ubuntu:24.04 -ENV SWOOLE_VERSION 5.1.4 +ENV SWOOLE_VERSION 5.1.5 ENV ENABLE_COROUTINE 0 ENV CPU_MULTIPLES 4 ENV DATABASE_DRIVER pgsql @@ -16,11 +16,10 @@ RUN apt update -yqq > /dev/null \ && cd /tmp/swoole-src-${SWOOLE_VERSION} \ && phpize > /dev/null \ && ./configure > /dev/null \ - && make -j8 > /dev/null \ + && make -j "$(nproc)" > /dev/null \ && make install > /dev/null \ && echo "extension=swoole.so" > /etc/php/8.3/cli/conf.d/50-swoole.ini \ - && echo "memory_limit=1024M" >> /etc/php/8.3/cli/php.ini \ - && php -m + && echo "memory_limit=1024M" >> /etc/php/8.3/cli/php.ini WORKDIR /swoole