Skip to content

Commit 6bcebea

Browse files
author
Serghey Rodin
committed
ondemand instead of dynamic php-fpm
1 parent 48c7b7f commit 6bcebea

File tree

53 files changed

+494
-361
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+494
-361
lines changed

install/debian/7/php5-fpm/www.conf

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
[www]
22
listen = 127.0.0.1:9000
33
listen.allowed_clients = 127.0.0.1
4+
45
user = www-data
56
group = www-data
6-
pm = dynamic
7-
pm.max_children = 50
8-
pm.start_servers = 5
9-
pm.min_spare_servers = 3
10-
pm.max_spare_servers = 35
7+
8+
pm = ondemand
9+
pm.max_children = 2
10+
pm.max_requests = 4000
11+
pm.process_idle_timeout = 10s

install/debian/7/templates/web/php5-fpm/default.tpl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ listen.allowed_clients = 127.0.0.1
55
user = %user%
66
group = %user%
77

8-
pm = dynamic
9-
pm.max_children = 50
10-
pm.start_servers = 3
11-
pm.min_spare_servers = 2
12-
pm.max_spare_servers = 10
8+
pm = ondemand
9+
pm.max_children = 4
10+
pm.max_requests = 4000
11+
pm.process_idle_timeout = 10s
12+
pm.status_path = /status
1313

1414
php_admin_value[upload_tmp_dir] = /home/%user%/tmp
1515
php_admin_value[session.save_path] = /home/%user%/tmp
Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
11
;[%backend%]
2+
;listen = /dev/null
3+
24
;user = %user%
35
;group = %user%
4-
;listen = /dev/null
56

67
;listen.owner = %user%
7-
;listen.group = nginx
8+
;listen.group = www-data
9+
10+
;pm = ondemand
11+
;pm.max_children = 4
12+
;pm.max_requests = 4000
13+
;pm.process_idle_timeout = 10s
14+
;pm.status_path = /status
815

9-
;pm = dynamic
10-
;pm.max_children = 50
11-
;pm.start_servers = 3
12-
;pm.min_spare_servers = 2
13-
;pm.max_spare_servers = 10
16+
;env[HOSTNAME] = $HOSTNAME
17+
;env[PATH] = /usr/local/bin:/usr/bin:/bin
18+
;env[TMP] = /home/%user%/tmp
19+
;env[TMPDIR] = /home/%user%/tmp
20+
;env[TEMP] = /home/%user%/tmp
Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
11
[%backend%]
2-
listen = /var/run/php5-%backend%.sock
2+
listen = /var/run/php/%backend%.sock
33
listen.allowed_clients = 127.0.0.1
44

55
user = %user%
66
group = %user%
77

8-
listen.owner = www-data
8+
listen.owner = %user%
99
listen.group = www-data
1010

11-
pm = dynamic
12-
pm.max_children = 50
13-
pm.start_servers = 3
14-
pm.min_spare_servers = 2
15-
pm.max_spare_servers = 10
11+
pm = ondemand
12+
pm.max_children = 4
13+
pm.max_requests = 4000
14+
pm.process_idle_timeout = 10s
15+
pm.status_path = /status
16+
17+
php_admin_value[upload_tmp_dir] = /home/%user%/tmp
18+
php_admin_value[session.save_path] = /home/%user%/tmp
1619

1720
env[HOSTNAME] = $HOSTNAME
1821
env[PATH] = /usr/local/bin:/usr/bin:/bin
19-
env[TMP] = /tmp
20-
env[TMPDIR] = /tmp
21-
env[TEMP] = /tmp
22+
env[TMP] = /home/%user%/tmp
23+
env[TMPDIR] = /home/%user%/tmp
24+
env[TEMP] = /home/%user%/tmp

install/debian/8/php5-fpm/www.conf

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
[www]
22
listen = 127.0.0.1:9000
33
listen.allowed_clients = 127.0.0.1
4+
45
user = www-data
56
group = www-data
6-
pm = dynamic
7-
pm.max_children = 50
8-
pm.start_servers = 5
9-
pm.min_spare_servers = 3
10-
pm.max_spare_servers = 35
7+
8+
pm = ondemand
9+
pm.max_children = 2
10+
pm.max_requests = 4000
11+
pm.process_idle_timeout = 10s

install/debian/8/templates/web/php5-fpm/default.tpl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ listen.allowed_clients = 127.0.0.1
55
user = %user%
66
group = %user%
77

8-
pm = dynamic
9-
pm.max_children = 50
10-
pm.start_servers = 3
11-
pm.min_spare_servers = 2
12-
pm.max_spare_servers = 10
8+
pm = ondemand
9+
pm.max_children = 4
10+
pm.max_requests = 4000
11+
pm.process_idle_timeout = 10s
12+
pm.status_path = /status
1313

1414
php_admin_value[upload_tmp_dir] = /home/%user%/tmp
1515
php_admin_value[session.save_path] = /home/%user%/tmp
Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
11
;[%backend%]
2+
;listen = /dev/null
3+
24
;user = %user%
35
;group = %user%
4-
;listen = /dev/null
56

67
;listen.owner = %user%
7-
;listen.group = nginx
8+
;listen.group = www-data
9+
10+
;pm = ondemand
11+
;pm.max_children = 4
12+
;pm.max_requests = 4000
13+
;pm.process_idle_timeout = 10s
14+
;pm.status_path = /status
815

9-
;pm = dynamic
10-
;pm.max_children = 50
11-
;pm.start_servers = 3
12-
;pm.min_spare_servers = 2
13-
;pm.max_spare_servers = 10
16+
;env[HOSTNAME] = $HOSTNAME
17+
;env[PATH] = /usr/local/bin:/usr/bin:/bin
18+
;env[TMP] = /home/%user%/tmp
19+
;env[TMPDIR] = /home/%user%/tmp
20+
;env[TEMP] = /home/%user%/tmp
Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
11
[%backend%]
2-
listen = /var/run/php5-%backend%.sock
2+
listen = /var/run/php/%backend%.sock
33
listen.allowed_clients = 127.0.0.1
44

55
user = %user%
66
group = %user%
77

8-
listen.owner = www-data
8+
listen.owner = %user%
99
listen.group = www-data
1010

11-
pm = dynamic
12-
pm.max_children = 50
13-
pm.start_servers = 3
14-
pm.min_spare_servers = 2
15-
pm.max_spare_servers = 10
11+
pm = ondemand
12+
pm.max_children = 4
13+
pm.max_requests = 4000
14+
pm.process_idle_timeout = 10s
15+
pm.status_path = /status
16+
17+
php_admin_value[upload_tmp_dir] = /home/%user%/tmp
18+
php_admin_value[session.save_path] = /home/%user%/tmp
1619

1720
env[HOSTNAME] = $HOSTNAME
1821
env[PATH] = /usr/local/bin:/usr/bin:/bin
19-
env[TMP] = /tmp
20-
env[TMPDIR] = /tmp
21-
env[TEMP] = /tmp
22+
env[TMP] = /home/%user%/tmp
23+
env[TMPDIR] = /home/%user%/tmp
24+
env[TEMP] = /home/%user%/tmp

install/rhel/5/php-fpm/www.conf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ listen = 127.0.0.1:9000
33
listen.allowed_clients = 127.0.0.1
44
user = apache
55
group = apache
6-
pm = dynamic
7-
pm.max_children = 50
8-
pm.start_servers = 5
9-
pm.min_spare_servers = 3
10-
pm.max_spare_servers = 35
6+
7+
pm = ondemand
8+
pm.max_children = 2
9+
pm.max_requests = 4000
10+
pm.process_idle_timeout = 10s

install/rhel/5/templates/web/php-fpm/default.tpl

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,17 @@ listen.allowed_clients = 127.0.0.1
55
user = %user%
66
group = %user%
77

8-
pm = dynamic
9-
pm.max_children = 50
10-
pm.start_servers = 3
11-
pm.min_spare_servers = 2
12-
pm.max_spare_servers = 10
8+
pm = ondemand
9+
pm.max_children = 4
10+
pm.max_requests = 4000
11+
pm.process_idle_timeout = 10s
12+
pm.status_path = /status
13+
14+
php_admin_value[upload_tmp_dir] = /home/%user%/tmp
15+
php_admin_value[session.save_path] = /home/%user%/tmp
1316

1417
env[HOSTNAME] = $HOSTNAME
1518
env[PATH] = /usr/local/bin:/usr/bin:/bin
16-
env[TMP] = /tmp
17-
env[TMPDIR] = /tmp
18-
env[TEMP] = /tmp
19+
env[TMP] = /home/%user%/tmp
20+
env[TMPDIR] = /home/%user%/tmp
21+
env[TEMP] = /home/%user%/tmp

0 commit comments

Comments
 (0)