Skip to content

Commit c7d84e7

Browse files
Merge pull request hestiacp#1597 from ioannidesalex/patch-41
Vesta PHP-FPM Optimization
2 parents 84202ca + 334436e commit c7d84e7

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/rpm/conf/php-fpm.conf

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -42,32 +42,32 @@ pid = /var/run/vesta-php.pid
4242
; instances running on the same server, you can change the default value
4343
; which must suit common needs.
4444
; Default Value: php-fpm
45-
;syslog.ident = php-fpm
45+
syslog.ident = vesta-php
4646

4747
; Log level
4848
; Possible Values: alert, error, warning, notice, debug
4949
; Default Value: notice
50-
;log_level = notice
50+
log_level = error
5151

5252
; If this number of child processes exit with SIGSEGV or SIGBUS within the time
5353
; interval set by emergency_restart_interval then FPM will restart. A value
5454
; of '0' means 'Off'.
5555
; Default Value: 0
56-
;emergency_restart_threshold = 0
56+
emergency_restart_threshold = 10
5757

5858
; Interval of time used by emergency_restart_interval to determine when
5959
; a graceful restart will be initiated. This can be useful to work around
6060
; accidental corruptions in an accelerator's shared memory.
6161
; Available Units: s(econds), m(inutes), h(ours), or d(ays)
6262
; Default Unit: seconds
6363
; Default Value: 0
64-
;emergency_restart_interval = 0
64+
emergency_restart_interval = 1m
6565

6666
; Time limit for child processes to wait for a reaction on signals from master.
6767
; Available units: s(econds), m(inutes), h(ours), or d(ays)
6868
; Default Unit: seconds
6969
; Default Value: 0
70-
;process_control_timeout = 0
70+
process_control_timeout = 10s
7171

7272
; The maximum number of processes FPM will fork. This has been design to control
7373
; the global number of processes when using dynamic PM within a lot of pools.
@@ -97,7 +97,7 @@ pid = /var/run/vesta-php.pid
9797
; - /dev/poll (Solaris >= 7)
9898
; - port (Solaris >= 10)
9999
; Default Value: not set (auto detection)
100-
; events.mechanism = epoll
100+
events.mechanism = epoll
101101

102102
;;;;;;;;;;;;;;;;;;;;
103103
; Pool Definitions ;
@@ -188,7 +188,7 @@ listen.mode = 0660
188188
; pm.process_idle_timeout - The number of seconds after which
189189
; an idle process will be killed.
190190
; Note: This value is mandatory.
191-
pm = dynamic
191+
pm = ondemand
192192

193193
; The number of child processes to be created when pm is set to 'static' and the
194194
; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.
@@ -199,33 +199,33 @@ pm = dynamic
199199
; forget to tweak pm.* to fit your needs.
200200
; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
201201
; Note: This value is mandatory.
202-
pm.max_children = 5
202+
pm.max_children = 2
203203

204204
; The number of child processes created on startup.
205205
; Note: Used only when pm is set to 'dynamic'
206206
; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
207-
pm.start_servers = 2
207+
;pm.start_servers = 2
208208

209209
; The desired minimum number of idle server processes.
210210
; Note: Used only when pm is set to 'dynamic'
211211
; Note: Mandatory when pm is set to 'dynamic'
212-
pm.min_spare_servers = 1
212+
;pm.min_spare_servers = 1
213213

214214
; The desired maximum number of idle server processes.
215215
; Note: Used only when pm is set to 'dynamic'
216216
; Note: Mandatory when pm is set to 'dynamic'
217-
pm.max_spare_servers = 3
217+
;pm.max_spare_servers = 3
218218

219219
; The number of seconds after which an idle process will be killed.
220220
; Note: Used only when pm is set to 'ondemand'
221221
; Default Value: 10s
222-
;pm.process_idle_timeout = 10s;
222+
pm.process_idle_timeout = 10s;
223223

224224
; The number of requests each child process should execute before respawning.
225225
; This can be useful to work around memory leaks in 3rd party libraries. For
226226
; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
227227
; Default Value: 0
228-
;pm.max_requests = 500
228+
pm.max_requests = 1000
229229

230230
; The URI to view the FPM status page. If this value is not set, no URI will be
231231
; recognized as a status page. It shows the following informations:

0 commit comments

Comments
 (0)