docker-library/drupal

Missing ini memory_limit and output_buffering

Jonniedev opened this issue ยท 3 comments

as described at: drupal memory requirements we need at least 128 MB.
also as of 10.2.0, It is now recommended to enable output buffering in php.ini

RUN echo 'memory_limit = 128M' > $PHP_INI_DIR/conf.d/docker-php-memlimit.ini \
    && echo 'output_buffering = On' > $PHP_INI_DIR/conf.d/docker-php-outbuf.ini

+1

The output buffer warning in Drupal status report has been coming up a lot for users of farmOS (a Drupal distribution that offers a Docker image based on this image).

For production environments, the PHP base image recommends enabling default PHP production configuration in downstream images, which also enabled output buffering:

# Use the default production configuration
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"

I don't think we can do that in this image, and it should be left up to downstream image maintainers/projects to implement.

But it may be worth considering enabling output buffering in this image as a baseline, since without it Drupal's status report shows a warning.

Yeah, enabling output buffering is 100% solid -- an explicit upstream recommendation is the best thing to convince me ๐Ÿ˜„

The memory limit is a little hazier -- they clearly recommend something, but the specific value they recommend is not as explicitly spelled out. ๐Ÿ˜ž

Agreed.

Also I think PHP's default memory_limit is 128M so assuming this image uses that, then it's already "done". :-)