goryn-clade / pathfinder-containers

A Docker-compose solution for Pathfinder mapping tool using Traefik
Other
62 stars 66 forks source link

[BUG] Calling /setup sometimes results in PHP OOM #2

Closed fleischsalatinspace closed 3 years ago

fleischsalatinspace commented 3 years ago

Version: latest master@534dfde63a11411f6314c1a4568dd5c83259ba31 Setup: development

Description:

Start a fresh install, create db tables on /setup , stop/start with docker-compose, visit $PFDOMAIN/setup Sometimes it loads, sometimes it fails with an OOM error like that:

pfdev        | [15-Sep-2021 09:17:10] WARNING: [pool www] child 85 said into stderr: "NOTICE: PHP message: PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 32768 bytes) in /var/www/html/pathfinder/app/Controller/LogController.php on line 1"
pfdev        | [15-Sep-2021 09:17:30] WARNING: [pool www] child 92 said into stderr: "NOTICE: PHP message: PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 12288 bytes) in /var/www/html/pathfinder/vendor/ikkez/f3-cortex/lib/db/cortex.php on line 2231"

Looks like /setup is limited by the php.ini default memory_limit value of 128M

Fix/Workaround:

diff --git a/static/php/php.ini b/static/php/php.ini
index f9082d2..5919688 100755
--- a/static/php/php.ini
+++ b/static/php/php.ini
@@ -1,3 +1,4 @@
+memory_limit = 256M
 upload_max_filesize = 100M
 post_max_size = 108M
 max_input_vars = 5000