Skip to content

Commit 1403268

Browse files
committed
Add interned string buffer variable
1 parent ca1f567 commit 1403268

File tree

3 files changed

+51
-40
lines changed

3 files changed

+51
-40
lines changed

README.md

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -30,26 +30,27 @@ Web/Worker just means whether these have any effect - nothing bad will happen if
3030

3131
For help running these locally with docker run see the [docker run reference](https://docs.docker.com/engine/reference/run/#env-environment-variables)
3232

33-
| Key | Description | Required | Web | Worker |
34-
| --- | --- | --- | --- | --- |
35-
| SITE_NAME | The name of your project, i.e. 'mywebsite'. Used by NR for app name. ||||
36-
| SITE_BRANCH | The running branch of your project, i.e. 'master'. Used by NR for app name. ||||
37-
| ENVIRONMENT | The environment you're running in, i.e. 'qa' or 'production'. Used by NR for app name. ||||
38-
| ATATUS_APM_LICENSE_KEY | Your Atatus license key. Atatus won't be used if this is not set. ||||
39-
| ATATUS_FRAMEWORK | Manually set the Atatus framework (see Atatus docs, typically "Laravel" or "Symfony") ||||
40-
| ATATUS_APM_RAW_SQL | Set to any value (1, true, etc) to use raw sql logging into Atatus ||||
41-
| PHP_MEMORY_MAX | Maximum PHP request memory, in megabytes (i.e. '256'). Defaults to 128. ||||
42-
| MAX_EXECUTION_TIME | Maximum PHP and Nginx execution/fastcgi read timeout ||||
43-
| PHP_FPM_WORKERS | Maximum PHP-FPM workers. Defaults to 4 if not set. ||||
44-
| PHP_FPM_USER | User which PHP-FPM workers are started as. Defaults to nobody. ||||
45-
| PHP_FPM_GROUP | Group which PHP-FPM workers are started as. Defaults to nobody. ||||
46-
| DISABLE_OPCACHE | Set to any value (1, true, etc) to disable PHP Opcache ||||
47-
| PHP_OPCACHE_MEMORY | Maximum PHP request memory, in megabytes (i.e. '64'). Defaults to 16. ||||
48-
| PHP_SESSION_STORE | If not set, PHP uses /tmp for sessions. If set to 'redis', uses redis for sessions ||||
49-
| PHP_SESSION_STORE_REDIS_HOST | If not set, defaults to 'redis'. Only used if PHP_SESSION_STORE is set to redis ||||
50-
| PHP_SESSION_STORE_REDIS_PORT | If not set, defaults to 6379. Only used if PHP_SESSION_STORE is set to redis ||||
51-
| PHP_DISABLE_CACHE_HEADERS | Set to any value (1, true, etc) to disable PHP's default pragma: no-cache headers ||||
52-
| PHP_ENABLE_SHORT_TAGS | Set to any value (1, true, etc) to enable PHP short tagging ||||
33+
| Key | Description | Required | Web | Worker |
34+
| --- | --- | --- | --- | --- |
35+
| SITE_NAME | The name of your project, i.e. 'mywebsite'. Used by NR for app name. ||||
36+
| SITE_BRANCH | The running branch of your project, i.e. 'master'. Used by NR for app name. ||||
37+
| ENVIRONMENT | The environment you're running in, i.e. 'qa' or 'production'. Used by NR for app name. ||||
38+
| ATATUS_APM_LICENSE_KEY | Your Atatus license key. Atatus won't be used if this is not set. ||||
39+
| ATATUS_FRAMEWORK | Manually set the Atatus framework (see Atatus docs, typically "Laravel" or "Symfony") ||||
40+
| ATATUS_APM_RAW_SQL | Set to any value (1, true, etc) to use raw sql logging into Atatus ||||
41+
| PHP_MEMORY_MAX | Maximum PHP request memory, in megabytes (i.e. '256'). Defaults to 128. ||||
42+
| MAX_EXECUTION_TIME | Maximum PHP and Nginx execution/fastcgi read timeout ||||
43+
| PHP_FPM_WORKERS | Maximum PHP-FPM workers. Defaults to 4 if not set. ||||
44+
| PHP_FPM_USER | User which PHP-FPM workers are started as. Defaults to nobody. ||||
45+
| PHP_FPM_GROUP | Group which PHP-FPM workers are started as. Defaults to nobody. ||||
46+
| DISABLE_OPCACHE | Set to any value (1, true, etc) to disable PHP Opcache ||||
47+
| PHP_OPCACHE_MEMORY | Maximum PHP request memory, in megabytes (i.e. '64'). Defaults to 16. ||||
48+
| PHP_OPCACHE_INTERNED_STRING_BUFFER | Maximum PHP interned string buffer memory, in megabytes (i.e. '16'). Defaults to 2. ||||
49+
| PHP_SESSION_STORE | If not set, PHP uses /tmp for sessions. If set to 'redis', uses redis for sessions ||||
50+
| PHP_SESSION_STORE_REDIS_HOST | If not set, defaults to 'redis'. Only used if PHP_SESSION_STORE is set to redis ||||
51+
| PHP_SESSION_STORE_REDIS_PORT | If not set, defaults to 6379. Only used if PHP_SESSION_STORE is set to redis ||||
52+
| PHP_DISABLE_CACHE_HEADERS | Set to any value (1, true, etc) to disable PHP's default pragma: no-cache headers ||||
53+
| PHP_ENABLE_SHORT_TAGS | Set to any value (1, true, etc) to enable PHP short tagging ||||
5354

5455
# The web mode/command
5556

README.md.template

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -30,26 +30,27 @@ Web/Worker just means whether these have any effect - nothing bad will happen if
3030

3131
For help running these locally with docker run see the [docker run reference](https://docs.docker.com/engine/reference/run/#env-environment-variables)
3232

33-
| Key | Description | Required | Web | Worker |
34-
| --- | --- | --- | --- | --- |
35-
| SITE_NAME | The name of your project, i.e. 'mywebsite'. Used by NR for app name. | ✓ | ✓ | ✓ |
36-
| SITE_BRANCH | The running branch of your project, i.e. 'master'. Used by NR for app name. | ✓ | ✓ | ✓ |
37-
| ENVIRONMENT | The environment you're running in, i.e. 'qa' or 'production'. Used by NR for app name. | ✓ | ✓ | ✓ |
38-
| ATATUS_APM_LICENSE_KEY | Your Atatus license key. Atatus won't be used if this is not set. | ✖ | ✓ | ✓ |
39-
| ATATUS_FRAMEWORK | Manually set the Atatus framework (see Atatus docs, typically "Laravel" or "Symfony") | ✖ | ✓ | ✓ |
40-
| ATATUS_APM_RAW_SQL | Set to any value (1, true, etc) to use raw sql logging into Atatus | ✖ | ✓ | ✓ |
41-
| PHP_MEMORY_MAX | Maximum PHP request memory, in megabytes (i.e. '256'). Defaults to 128. | ✖ | ✓ | ✓ |
42-
| MAX_EXECUTION_TIME | Maximum PHP and Nginx execution/fastcgi read timeout | ✖ | ✓ | ✓ |
43-
| PHP_FPM_WORKERS | Maximum PHP-FPM workers. Defaults to 4 if not set. | ✖ | ✓ | ✖ |
44-
| PHP_FPM_USER | User which PHP-FPM workers are started as. Defaults to nobody. | ✖ | ✓ | ✖ |
45-
| PHP_FPM_GROUP | Group which PHP-FPM workers are started as. Defaults to nobody. | ✖ | ✓ | ✖ |
46-
| DISABLE_OPCACHE | Set to any value (1, true, etc) to disable PHP Opcache | ✖ | ✓ | ✓ |
47-
| PHP_OPCACHE_MEMORY | Maximum PHP request memory, in megabytes (i.e. '64'). Defaults to 16. | ✖ | ✓ | ✓ |
48-
| PHP_SESSION_STORE | If not set, PHP uses /tmp for sessions. If set to 'redis', uses redis for sessions | ✖ | ✓ | ✓ |
49-
| PHP_SESSION_STORE_REDIS_HOST | If not set, defaults to 'redis'. Only used if PHP_SESSION_STORE is set to redis | ✖ | ✓ | ✓ |
50-
| PHP_SESSION_STORE_REDIS_PORT | If not set, defaults to 6379. Only used if PHP_SESSION_STORE is set to redis | ✖ | ✓ | ✓ |
51-
| PHP_DISABLE_CACHE_HEADERS | Set to any value (1, true, etc) to disable PHP's default pragma: no-cache headers | ✖ | ✓ | ✖ |
52-
| PHP_ENABLE_SHORT_TAGS | Set to any value (1, true, etc) to enable PHP short tagging | ✖ | ✓ | ✓ |
33+
| Key | Description | Required | Web | Worker |
34+
| --- | --- | --- | --- | --- |
35+
| SITE_NAME | The name of your project, i.e. 'mywebsite'. Used by NR for app name. | ✓ | ✓ | ✓ |
36+
| SITE_BRANCH | The running branch of your project, i.e. 'master'. Used by NR for app name. | ✓ | ✓ | ✓ |
37+
| ENVIRONMENT | The environment you're running in, i.e. 'qa' or 'production'. Used by NR for app name. | ✓ | ✓ | ✓ |
38+
| ATATUS_APM_LICENSE_KEY | Your Atatus license key. Atatus won't be used if this is not set. | ✖ | ✓ | ✓ |
39+
| ATATUS_FRAMEWORK | Manually set the Atatus framework (see Atatus docs, typically "Laravel" or "Symfony") | ✖ | ✓ | ✓ |
40+
| ATATUS_APM_RAW_SQL | Set to any value (1, true, etc) to use raw sql logging into Atatus | ✖ | ✓ | ✓ |
41+
| PHP_MEMORY_MAX | Maximum PHP request memory, in megabytes (i.e. '256'). Defaults to 128. | ✖ | ✓ | ✓ |
42+
| MAX_EXECUTION_TIME | Maximum PHP and Nginx execution/fastcgi read timeout | ✖ | ✓ | ✓ |
43+
| PHP_FPM_WORKERS | Maximum PHP-FPM workers. Defaults to 4 if not set. | ✖ | ✓ | ✖ |
44+
| PHP_FPM_USER | User which PHP-FPM workers are started as. Defaults to nobody. | ✖ | ✓ | ✖ |
45+
| PHP_FPM_GROUP | Group which PHP-FPM workers are started as. Defaults to nobody. | ✖ | ✓ | ✖ |
46+
| DISABLE_OPCACHE | Set to any value (1, true, etc) to disable PHP Opcache | ✖ | ✓ | ✓ |
47+
| PHP_OPCACHE_MEMORY | Maximum PHP request memory, in megabytes (i.e. '64'). Defaults to 16. | ✖ | ✓ | ✓ |
48+
| PHP_OPCACHE_INTERNED_STRING_BUFFER | Maximum PHP interned string buffer memory, in megabytes (i.e. '16'). Defaults to 2. | ✖ | ✓ | ✓ |
49+
| PHP_SESSION_STORE | If not set, PHP uses /tmp for sessions. If set to 'redis', uses redis for sessions | ✖ | ✓ | ✓ |
50+
| PHP_SESSION_STORE_REDIS_HOST | If not set, defaults to 'redis'. Only used if PHP_SESSION_STORE is set to redis | ✖ | ✓ | ✓ |
51+
| PHP_SESSION_STORE_REDIS_PORT | If not set, defaults to 6379. Only used if PHP_SESSION_STORE is set to redis | ✖ | ✓ | ✓ |
52+
| PHP_DISABLE_CACHE_HEADERS | Set to any value (1, true, etc) to disable PHP's default pragma: no-cache headers | ✖ | ✓ | ✖ |
53+
| PHP_ENABLE_SHORT_TAGS | Set to any value (1, true, etc) to enable PHP short tagging | ✖ | ✓ | ✓ |
5354

5455
# The web mode/command
5556

php/scripts/configure.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,17 @@ if [ ! -z "$PHP_OPCACHE_MEMORY" ]; then
155155

156156
fi
157157

158+
# If set
159+
if [ ! -z "$PHP_OPCACHE_INTERNED_STRING_BUFFER" ]; then
160+
161+
# Set PHP.ini accordingly
162+
sed -i -e "s#opcache.interned_strings_buffer=2#opcache.interned_strings_buffer=${PHP_OPCACHE_INTERNED_STRING_BUFFER}#g" /etc/php/current/php.ini
163+
164+
fi
165+
158166
# Print the real value
159167
printf "\e[94m%-30s\e[0m \e[35m%-30s\e[0m\n" "Opcache Memory Max:" "`php -r 'echo ini_get("opcache.memory_consumption");'`M"
168+
printf "\e[94m%-30s\e[0m \e[35m%-30s\e[0m\n" "Opcache Interned Strings Buffer:" "`php -r 'echo ini_get("opcache.interned_strings_buffer");'`M"
160169

161170
# PHP Session Config
162171
# If set

0 commit comments

Comments
 (0)