From 6370dfe9a9621e7f14a3bd9b9493d43e5aca2b14 Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Wed, 6 Jul 2022 02:55:20 +0300 Subject: [PATCH] Some tweak tries to prevent memory leaks. --- .dockerignore | 3 --- .rr.yaml | 9 ++++++--- config/packages/baldinof_road_runner.yaml | 3 ++- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.dockerignore b/.dockerignore index 4a177f5..2eda646 100644 --- a/.dockerignore +++ b/.dockerignore @@ -5,9 +5,6 @@ !app/cache/.gitkeep !app/logs/.gitkeep -# Email spool folder -/app/spool/* - # Cache, session files and logs (Symfony3) /var/cache/* /var/sessions/* diff --git a/.rr.yaml b/.rr.yaml index 0f0a352..d729d71 100644 --- a/.rr.yaml +++ b/.rr.yaml @@ -1,12 +1,11 @@ +# https://roadrunner.dev/docs/intro-config/2.x/en version: "2.7" server: command: "php public/index.php" - # If you are not using symfony 5.3+ and the new Runtime component: - # remove the previous `command` line above and uncomment the line below to use the deprecated command. - # command: "php bin/console baldinof:roadrunner:worker" env: - APP_RUNTIME: Baldinof\RoadRunnerBundle\Runtime\Runtime + - APP_ENV: prod http: address: 0.0.0.0:8080 @@ -16,6 +15,10 @@ http: static: dir: "public" forbid: [ ".php", ".htaccess" ] + pool: + max_jobs: 16 + supervisor: + max_worker_memory: 256 logs: mode: production diff --git a/config/packages/baldinof_road_runner.yaml b/config/packages/baldinof_road_runner.yaml index 3728e09..e5acb91 100644 --- a/config/packages/baldinof_road_runner.yaml +++ b/config/packages/baldinof_road_runner.yaml @@ -3,7 +3,8 @@ baldinof_road_runner: # See https://github.com/baldinof/roadrunner-bundle#kernel-reboots kernel_reboot: # if you want to use a fresh container on each request, use the `always` strategy - strategy: on_exception + #strategy: on_exception + strategy: always # Exceptions you KNOW that do not put your app in an errored state allowed_exceptions: - Symfony\Component\HttpKernel\Exception\HttpExceptionInterface