Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use var PHP_OPCACHE_MEMORY_CONSUMPTION for configuration #2090

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tclavier
Copy link
Contributor

No description provided.

Signed-off-by: Thomas Clavier <tom@tcweb.org>
Signed-off-by: Thomas Clavier <tom@tcweb.org>
@jjasoncool
Copy link

jjasoncool commented Nov 29, 2023

I think maybe using "sed" to change original files?
https://github.com/nextcloud/docker/blob/master/27/fpm/Dockerfile#L99-L103

@tclavier
Copy link
Contributor Author

using sed in startup script to replace opcache.memory_consumption=128 by opcache.memory_consumption=${PHP_OPCACHE_MEMORY_CONSUMTION} ?

@jjasoncool
Copy link

using sed in startup script to replace opcache.memory_consumption=128 by opcache.memory_consumption=${PHP_OPCACHE_MEMORY_CONSUMTION} ?

Sorry, That all version was build by template files, your code is right.
But I think that can also add ENV jit_buffer_size also.

@J0WI
Copy link
Contributor

J0WI commented Jan 9, 2024

This requires some documentation in the README.

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_CONSUMTION}'; \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
echo 'opcache.memory_consumption=${PHP_OPCACHE_MEMORY_CONSUMTION}'; \
echo 'opcache.memory_consumption=${PHP_OPCACHE_MEMORY_CONSUMPTION}'; \

@@ -95,7 +96,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_CONSUMTION}'; \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
echo 'opcache.memory_consumption=${PHP_OPCACHE_MEMORY_CONSUMTION}'; \
echo 'opcache.memory_consumption=${PHP_OPCACHE_MEMORY_CONSUMPTION}'; \

Copy link
Member

@joshtrichards joshtrichards left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're going to support opcache changes like this, we should probably also support opcache.max_accelerated_files and opcache.interned_strings_buffer since they're all part of the same setup checks in Server. Otherwise it'll be an incomplete enhancement.

@joshtrichards joshtrichards changed the title use var PHP_OPCACHE_MEMORY_CONSUMTION for configuration use var PHP_OPCACHE_MEMORY_CONSUMPTION for configuration Feb 8, 2024
@J0WI
Copy link
Contributor

J0WI commented Apr 2, 2024

See also #2185 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants