[www]
; The user and group FPM will run as
user = www-data
group = www-data

; The address on which to accept FastCGI requests
listen = 9000

; Set listen(2) backlog
listen.backlog = 511

; Set permissions for unix socket, if one is used
listen.owner = www-data
listen.group = www-data
listen.mode = 0660

; Process manager settings
; Using 'static' for production for better performance and predictability
pm = static

; The number of child processes to be created when pm is set to 'static'
; For production, calculate based on: (Total RAM - RAM for other processes) / RAM per PHP process
; Each PHP process typically uses 20-50MB depending on your application
; For a 1GB container, 20-25 processes is usually good
pm.max_children = 100

; The number of requests each child process should execute before respawning
; Higher value for production to reduce overhead
pm.max_requests = 1000

; The URI to view the FPM status page (disabled in production for security)
;pm.status_path = /fpm-status

; The ping URI to call the monitoring page of FPM (disabled in production for security)
;ping.path = /fpm-ping

; Access log settings (disabled in production for performance)
;access.log = /proc/self/fd/2

; Slow log settings
slowlog = /proc/self/fd/2
request_slowlog_timeout = 30s

; Set open file descriptor rlimit
rlimit_files = 1024

; Set max core size rlimit
rlimit_core = 0

; Redirect worker stdout and stderr into main error log
catch_workers_output = yes

; Decorate worker output with prefix and suffix containing information about the child that writes to the log entry
decorate_workers_output = no

; Clear environment in FPM workers
clear_env = no

; Security limit extensions
security.limit_extensions = .php .phar

; Environment variables
env[HOSTNAME] = $HOSTNAME
env[PATH] = /usr/local/bin:/usr/bin:/bin
env[TMP] = /tmp
env[TMPDIR] = /tmp
env[TEMP] = /tmp
