Closed jessedobbelaere closed 1 month ago
I also still have the same problem. @jasonmccallister
Thank you for the report.
I'm going to remove these setting from the php-fpm.conf file:
; Performance settings
php_admin_value[memory_limit] = "256M"
php_admin_value[max_execution_time] = "120"
; Upload settings
php_admin_value[post_max_size] = "100M"
php_admin_value[upload_max_filesize] = "100M"
This should be changed in these builds:
Please reopen if there is anything out of the ordinary.
Thank you @jessedobbelaere @internetztube for the report again!
Description
tl;dr The README mentions you can specify the env variable
PHP_MEMORY_LIMIT
, but this does not work.I figured out that
memory_limit
is set by both60-craftcms.ini
https://github.com/craftcms/image/blob/77f50583aff272056529b1cebceb77f07984581f/etc/php.d/60-craftcms.ini#L1
but also by
php-fpm.conf
using:https://github.com/craftcms/image/blob/77f50583aff272056529b1cebceb77f07984581f/etc/php-fpm/php-fpm.conf#L225
As a recap for
php_admin_value
, these cannot get overwritten with regular .ini files:So in fact, there's no way that any .ini file or env variable
PHP_MEMORY_LIMIT
can override settings likememory_limit
.Steps to reproduce
cd examples/nginx
docker-compose.yaml
, like advertised in the README.md:docker compose up -d
memory_limit
which is set to 256M which is the value used byphp_admin_value
/etc/php-fpm.conf
in a Dockerfile build that extends from the 8.3 image 😅 After commenting it out, the override actually works.Additional info