1 |
jcrisp |
1.1 |
diff -ruN smeserver-nextcloud-1.2.0.old/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/15Nextcloud smeserver-nextcloud-1.2.0/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/15Nextcloud |
2 |
|
|
--- smeserver-nextcloud-1.2.0.old/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/15Nextcloud 2020-11-13 17:13:39.403645729 +0100 |
3 |
|
|
+++ smeserver-nextcloud-1.2.0/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/15Nextcloud 2020-11-13 17:26:14.593466967 +0100 |
4 |
|
|
@@ -9,6 +9,16 @@ |
5 |
|
|
my $open_basedir= $nextcloud{PHPBaseDir} || ''; |
6 |
|
|
$open_basedir = "/usr/share/nextcloud:/var/lib/nextcloud:/var/log/nextcloud.log:/var/lib/php/nextcloud:/home/e-smith/files/nextcloud:/dev/urandom:/proc/meminfo:$open_basedir"; |
7 |
|
|
my $id = 'nextcloud'; |
8 |
|
|
+ my $max_children = $nextcloud{'PHPmaxChildren'} || 20; |
9 |
|
|
+ my $min_spare_servers = $nextcloud{'PHPminServers'} || 4; |
10 |
|
|
+ my $start_servers = $nextcloud{'PHPstartServers'} || 6; |
11 |
|
|
+ my $max_spare_servers = $nextcloud{'PHPmaxServers'} || 8; |
12 |
|
|
+ my $max_requests = $nextcloud{'PHPmaxRequests'} || 1000; |
13 |
|
|
+ # We probably ought to check that |
14 |
|
|
+ # min Servers <= max Servers |
15 |
|
|
+ # and |
16 |
|
|
+ # start Servers >=min and <=max |
17 |
|
|
+ |
18 |
|
|
$OUT .=<<_EOF; |
19 |
|
|
|
20 |
|
|
[php$PHP_VERSION-$id] |
21 |
|
|
@@ -19,11 +29,11 @@ |
22 |
|
|
listen.mode = 0660 |
23 |
|
|
listen = /var/run/php-fpm/php$PHP_VERSION-$id.sock |
24 |
|
|
pm = dynamic |
25 |
|
|
-pm.max_children = 15 |
26 |
|
|
-pm.start_servers = 3 |
27 |
|
|
-pm.min_spare_servers = 3 |
28 |
|
|
-pm.max_spare_servers = 4 |
29 |
|
|
-pm.max_requests = 1000 |
30 |
|
|
+pm.max_children = $max_children |
31 |
|
|
+pm.start_servers = $start_servers |
32 |
|
|
+pm.min_spare_servers = $min_spare_servers |
33 |
|
|
+pm.max_spare_servers = $max_spare_servers |
34 |
|
|
+pm.max_requests = $max_requests |
35 |
|
|
php_admin_value[session.save_path] = /var/lib/php/$id/session |
36 |
|
|
php_admin_value[session.gc_maxlifetime] = 86400 |
37 |
|
|
php_admin_value[opcache.file_cache] = /var/lib/php/$id/opcache |