use var PHP_OPCACHE_MEMORY_CONSUMPTION for configuration (#2090)
* use var PHP_OPCACHE_MEMORY_CONSUMTION for configuration Signed-off-by: Thomas Clavier <tom@tcweb.org> * Use PHP_OPCACHE_MEMORY_CONSUMTION in Dockerfile-alpine.template Signed-off-by: Thomas Clavier <tom@tcweb.org> * fix typo : CONSUMTION -> CONSUMPTION * Add opcache.memory_consumption documentation * fix typo --------- Signed-off-by: Thomas Clavier <tom@tcweb.org>
This commit is contained in:
Родитель
7f707b6c5d
Коммит
e0294b65ac
|
@ -88,11 +88,12 @@ RUN set -ex; \
|
|||
# see https://docs.nextcloud.com/server/latest/admin_manual/installation/server_tuning.html#enable-php-opcache
|
||||
ENV PHP_MEMORY_LIMIT 512M
|
||||
ENV PHP_UPLOAD_LIMIT 512M
|
||||
ENV PHP_OPCACHE_MEMORY_CONSUMPTION 128
|
||||
RUN { \
|
||||
echo 'opcache.enable=1'; \
|
||||
echo 'opcache.interned_strings_buffer=32'; \
|
||||
echo 'opcache.max_accelerated_files=10000'; \
|
||||
echo 'opcache.memory_consumption=128'; \
|
||||
echo 'opcache.memory_consumption=${PHP_OPCACHE_MEMORY_CONSUMPTION}'; \
|
||||
echo 'opcache.save_comments=1'; \
|
||||
echo 'opcache.revalidate_freq=60'; \
|
||||
echo 'opcache.jit=1255'; \
|
||||
|
|
|
@ -20,6 +20,7 @@ RUN set -ex; \
|
|||
# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html
|
||||
ENV PHP_MEMORY_LIMIT 512M
|
||||
ENV PHP_UPLOAD_LIMIT 512M
|
||||
ENV PHP_OPCACHE_MEMORY_CONSUMPTION 128
|
||||
RUN set -ex; \
|
||||
\
|
||||
savedAptMark="$(apt-mark showmanual)"; \
|
||||
|
@ -97,7 +98,7 @@ RUN { \
|
|||
echo 'opcache.enable=1'; \
|
||||
echo 'opcache.interned_strings_buffer=32'; \
|
||||
echo 'opcache.max_accelerated_files=10000'; \
|
||||
echo 'opcache.memory_consumption=128'; \
|
||||
echo 'opcache.memory_consumption=${PHP_OPCACHE_MEMORY_CONSUMPTION}'; \
|
||||
echo 'opcache.save_comments=1'; \
|
||||
echo 'opcache.revalidate_freq=60'; \
|
||||
echo 'opcache.jit=1255'; \
|
||||
|
|
|
@ -300,6 +300,7 @@ Check the [Nextcloud documentation](https://docs.nextcloud.com/server/latest/adm
|
|||
To customize PHP limits you can change the following variables:
|
||||
- `PHP_MEMORY_LIMIT` (default `512M`) This sets the maximum amount of memory in bytes that a script is allowed to allocate. This is meant to help prevent poorly written scripts from eating up all available memory but it can prevent normal operation if set too tight.
|
||||
- `PHP_UPLOAD_LIMIT` (default `512M`) This sets the upload limit (`post_max_size` and `upload_max_filesize`) for big files. Note that you may have to change other limits depending on your client, webserver or operating system. Check the [Nextcloud documentation](https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/big_file_upload_configuration.html) for more information.
|
||||
- `PHP_OPCACHE_MEMORY_CONSUMPTION` (default `128`) This sets the `opcache.memory_consumption` value. It's the size of the shared memory storage used by OPcache, in megabytes.
|
||||
|
||||
### Apache Configuration
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче