kyrofa / owncloud-snap

ownCloud packaged as a .snap for Ubuntu Core.
GNU General Public License v3.0
11 stars 4 forks source link

PHP-FPM config #28

Closed oparoz closed 7 years ago

oparoz commented 8 years ago

@jospoortvliet has dug out this from here:

request_slowlog_timeout = 5s
pm = dynamic
pm.max_children = 9
pm.start_servers = 3
pm.min_spare_servers = 2
pm.max_spare_servers = 4
pm.max_requests = 200
listen.backlog = -1
request_terminate_timeout = 120s
rlimit_files = 131072
rlimit_core = unlimited

I'm currently using

pm = ondemand
pm.max_children = 9
pm.process_idle_timeout = 60
pm.max_requests = 200

I think playing with the start_servers could be useful, but we have to be careful with memory usage.

We have to check every setting and make sure they're not the default already.

The web is littered with only configurations, using obsolete switches and options.

@ezraholm50 @enoch85

enoch85 commented 8 years ago

Why do we want PHP-FPM? Is it faster? My experience is the opposite.

jospoortvliet commented 8 years ago

@enoch85 yeah, I had bad experiences too, but Tha Intarnetz says that, if configured well, it should be faster and save memory.

oparoz commented 8 years ago

It is faster if you configure it properly and make lots of servers available per example, but it definitely uses less RAM when combine with mpm_event.

oparoz commented 8 years ago

I'm going to go with pm=dynamic (on demand is better for shared web hosting), but it's going to be user tunable.