From e3fffa522a2978bb107757da0f19c6c5b8c9d0b8 Mon Sep 17 00:00:00 2001 From: Hattshire Date: Mon, 16 Jun 2025 22:02:29 -0400 Subject: [PATCH] Tune PHP again (uncommited changes from long ago) --- images/nc/Dockerfile | 3 +++ images/nc/fpmtune.ini | 5 +++++ images/ngx/nginx.conf | 7 ++++++- 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 images/nc/fpmtune.ini diff --git a/images/nc/Dockerfile b/images/nc/Dockerfile index 88b10f1..e10cb52 100644 --- a/images/nc/Dockerfile +++ b/images/nc/Dockerfile @@ -10,6 +10,9 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ ## Increase memory limits COPY upload.ini /usr/local/etc/php/conf.d/upload.ini +## Tune PHP-FPM Children +COPY fpmtune.ini /usr/local/etc/php/conf.d/fpmtune.ini + # Remove residual gcc RUN apt remove gcc -y && apt autoremove -y \ && rm -rf /var/lib/apt/lists/* diff --git a/images/nc/fpmtune.ini b/images/nc/fpmtune.ini new file mode 100644 index 0000000..dfb734f --- /dev/null +++ b/images/nc/fpmtune.ini @@ -0,0 +1,5 @@ +pm.max_children=51 +pm.start_servers=12 +pm.min_spare_servers=12 +pm.max_spare_servers=38 + diff --git a/images/ngx/nginx.conf b/images/ngx/nginx.conf index cc32c61..454b9b8 100644 --- a/images/ngx/nginx.conf +++ b/images/ngx/nginx.conf @@ -29,7 +29,8 @@ http { # Prevent nginx HTTP Server Detection server_tokens off; - keepalive_timeout 65; + # Old value: 65 ! didnt work + keepalive_timeout 256; gzip on; @@ -151,6 +152,7 @@ http { #fastcgi_param HTTPS on; fastcgi_read_timeout 3600; + fastcgi_send_timeout 3600; proxy_read_timeout 3600; proxy_connect_timeout 3600; @@ -182,5 +184,8 @@ http { location / { try_files $uri $uri/ /index.php$request_uri; } + location /simliveradio { + proxy_pass http://simliveradio.stream.laut.fm/simliveradio; + } } }