-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathphp.ini
More file actions
56 lines (46 loc) · 2.4 KB
/
php.ini
File metadata and controls
56 lines (46 loc) · 2.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
; On the CLI we want errors to be sent to stdout -> those will end up in CloudWatch
; In FPM workers we don't want that, but that is overridden by Bref when it starts PHP-FPM
display_errors=1
; Since PHP 7.4 the default value is E_ALL
; We override it to set the recommended configuration value for production.
; See https://github.com/php/php-src/blob/d91abf76e01a3c39424e8192ad049f473f900936/php.ini-production#L463
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
memory_limit=10240M
opcache.enable=1
opcache.enable_cli=1
; Store the opcodes into a file cache (on top of storing in memory)
; With FPM, this is only useful if FPM restarts or if the shared memory cache is full.
; With the function runtime, this is useful when the function restarts the PHP
; process on every invocation.
; TODO store in a subdirectory (but the problem is that the subdirectory doesn't exist when PHP starts...)
opcache.file_cache="/tmp"
; Disable the memory cache since it's useless
; In my tests it allows to gain 30% of response time in a classic API controller
opcache.file_cache_only=1
; Skip this check to save a bit
opcache.validate_permission=0
; The code is readonly on lambdas so it never changes
; This setting is now disabled: code could be written to /tmp which is read/write
; (e.g. a compiled container) Such a performance optimization can be done by users.
;opcache.validate_timestamps=0
; Set sane values, modern PHP applications have higher needs than opcache's defaults
; See https://tideways.com/profiler/blog/fine-tune-your-opcache-configuration-to-avoid-caching-suprises
opcache.memory_consumption=128
opcache.max_accelerated_files=10000
; This directive determines which super global arrays are registered when PHP
; starts up. G,P,C,E & S are abbreviations for the following respective super
; globals: GET, POST, COOKIE, ENV and SERVER.
; We explicitly populate all variables else ENV is not populated by default.
; See https://github.com/brefphp/bref/pull/291
variables_order="EGPCS"
; The lambda environment is not compatible with fastcgi_finish_request
; See https://github.com/brefphp/bref/issues/214
disable_functions=fastcgi_finish_request
; The total upload size limit is 6Mb, we override the defaults to match this limit
; API Gateway has a 10Mb limit, but Lambda's is 6Mb
post_max_size=6M
upload_max_filesize=6M
extension_dir=/opt/bref/extensions
; Extensions enabled by default
extension=mbstring
zend_extension=opcache.so