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

opcache_interned_strings_buffer_value #2540

Merged
merged 5 commits into from
Aug 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ PHP_FPM_DIR=/etc/php/$PHPVER/fpm
PHP_INI=$PHP_FPM_DIR/php.ini
PHP_POOL_DIR=$PHP_FPM_DIR/pool.d
PHP_MODS_DIR=/etc/php/"$PHPVER"/mods-available
opcache_interned_strings_buffer_value=24
# Notify push
NOTIFY_PUSH_SERVICE_PATH="/etc/systemd/system/notify_push.service"
# Adminer
Expand Down
2 changes: 1 addition & 1 deletion nextcloud_install_production.sh
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ phpenmod opcache
echo "# OPcache settings for Nextcloud"
echo "opcache.enable=1"
echo "opcache.enable_cli=1"
echo "opcache.interned_strings_buffer=16"
echo "opcache.interned_strings_buffer=$opcache_interned_strings_buffer_value"
echo "opcache.max_accelerated_files=10000"
echo "opcache.memory_consumption=256"
echo "opcache.save_comments=1"
Expand Down
7 changes: 4 additions & 3 deletions nextcloud_update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1101,10 +1101,11 @@ then
fi
if [ "${CURRENTVERSION%%.*}" -ge "23" ]
then
# Raise OPCache
if grep -q "opcache.interned_strings_buffer=8" "$PHP_INI"
# Update opcache.interned_strings_buffer
if ! grep -r opcache.interned_strings_buffer="$opcache_interned_strings_buffer_value" $PHP_INI
then
sed -i "s|opcache.interned_strings_buffer.*|opcache.interned_strings_buffer=16|g" "$PHP_INI"
sed -i "s|opcache.interned_strings_buffer=.*|opcache.interned_strings_buffer=$opcache_interned_strings_buffer_value|g" $PHP_INI
restart_webserver
fi
fi
else
Expand Down