Skip to content

Commit

Permalink
opcache_interned_strings_buffer_value (#2540)
Browse files Browse the repository at this point in the history
  • Loading branch information
enoch85 authored Aug 9, 2023
1 parent 82f8b91 commit f791c53
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
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

0 comments on commit f791c53

Please sign in to comment.