fix: fix kill handler usage in examples
[poolifier.git] / examples / typescript / http-server-pool / fastify-hybrid / src / main.ts
index ca7c42d4b6c59c626235d9cc50821446a86db95f..d840dfb9529d0c01e659e7e8b79080cdb3c5938b 100644 (file)
@@ -22,7 +22,10 @@ const pool = new FixedClusterPool<ClusterWorkerData, ClusterWorkerResponse>(
         .execute({
           port: 8080,
           workerFile: requestHandlerWorkerFile,
-          maxWorkers: Math.round(availableParallelism() / 2),
+          maxWorkers:
+            Math.round(availableParallelism() / 4) < 1
+              ? 1
+              : Math.round(availableParallelism() / 4),
           enableTasksQueue: true,
           tasksQueueOptions: {
             concurrency: 8