Pārlūkot izejas kodu

php-ngx 3x workers (#5524)

Joan Miquel 5 gadi atpakaļ
vecāks
revīzija
af03e65b7b

+ 1 - 7
frameworks/PHP/php-ngx/app.php

@@ -39,7 +39,7 @@ function query()
 
 function update()
 {
-    global $pdo, $random, $update;
+    global $random, $update;
     ngx_header_set('Content-Type', 'application/json');
 
     $query_count = 1;
@@ -58,12 +58,6 @@ function update()
         $arr[] = $world;
     }
 
-    // $pdo->beginTransaction();
-    // foreach($arr as $world) {
-    //     $update->execute([$world['randomNumber'], $world['id']]);
-    // }
-    // $pdo->commit();
-
     echo json_encode($arr, JSON_NUMERIC_CHECK);
 }
 

+ 1 - 1
frameworks/PHP/php-ngx/php-ngx-pgsql.dockerfile

@@ -28,6 +28,6 @@ RUN wget -q http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz && \
 
 RUN sed -i "s|mysql:|pgsql:|g" /app.php
 
-CMD export WORKERS=$(( 4 * $(nproc) )) && \
+CMD export WORKERS=$(( 3 * $(nproc) )) && \
     sed -i "s/worker_processes  auto/worker_processes $WORKERS/g" /deploy/nginx.conf && \
     /nginx/sbin/nginx -c /deploy/nginx.conf