Configuring PHP-FPM for 2gb ram?

Asked

Viewed 171 times

1

I have the following instance at AWS:

t2.small (Variable Ecus, 1 vCPUs, 2.5 Ghz, Intel Xeon Family, 2 Gib memory, EBS only)

And in my error log is showing

WARNING: [pool www] server reached pm.max_children setting (8), consider raising it

My configuration is like this:

pm                        = dynamic
pm.max_children           = 8
pm.start_servers          = 3
pm.min_spare_servers      = 3
pm.max_spare_servers      = 6
pm.max_requests           = 200
pm.process_idle_timeout   = 10s;
;pm.status_path           = /status
;ping.path                = /ping
;ping.response            = pong

request_terminate_timeout = 200s
request_slowlog_timeout   = 60s

php_admin_value[memory_limit] = 128M

I just thought about doubling the max_children, but I wanted to have a more appropriate setting for the instance I use.

1 answer

1


From what I understand, PHP-FPM has reached the maximum limit of child processes.

Currently my limit is set to 8 processes, but as the machine has 2gb, it would increase the limit up to 16.

Account: 2048mb memory instance / 128mb memory per request = 16

pm.max_children = 16
php_admin_value[memory_limit] = 128M

Browser other questions tagged

You are not signed in. Login or sign up in order to post.