|
| 1 | +; ################################################################################ |
| 2 | +; #### |
| 3 | +; #### The following settings can be overwritten by later includes |
| 4 | +; #### |
| 5 | +; ################################################################################ |
| 6 | + |
| 7 | + |
| 8 | +; ############################################################ |
| 9 | +; Timeouts |
| 10 | +; ############################################################ |
| 11 | + |
| 12 | +[www] |
| 13 | +; The timeout for serving a single request after which the worker process will be killed. |
| 14 | +; This option should be used when the 'max_execution_time' ini option does not stop script |
| 15 | +; execution for some reason. |
| 16 | +request_terminate_timeout = 120s |
| 17 | + |
| 18 | + |
| 19 | +; ############################################################ |
| 20 | +; Logging |
| 21 | +; ############################################################ |
| 22 | + |
| 23 | +[global] |
| 24 | +error_log = /proc/self/fd/2 |
| 25 | +log_level = notice |
| 26 | + |
| 27 | +[www] |
| 28 | +; if we send this to /proc/self/fd/1, it never appears |
| 29 | +access.log = /proc/self/fd/2 |
| 30 | + |
| 31 | + |
| 32 | +; ############################################################ |
| 33 | +; Backlog configuration |
| 34 | +; ############################################################ |
| 35 | + |
| 36 | +[www] |
| 37 | +; A maximum of backlog incoming connections will be queued for processing. |
| 38 | +; If a connection request arrives with the queue full the client may receive an error with an |
| 39 | +; indication of ECONNREFUSED, or, if the underlying protocol supports retransmission, |
| 40 | +; the request may be ignored so that retries may succeed. |
| 41 | + |
| 42 | +; This should not be greater than `cat /proc/sys/net/core/somaxconn`, otherwise connections |
| 43 | +; are silently truncated |
| 44 | +listen.backlog = 1024 |
| 45 | + |
| 46 | + |
| 47 | +; ############################################################ |
| 48 | +; Worker configuration |
| 49 | +; ############################################################ |
| 50 | + |
| 51 | +[www] |
| 52 | +; static - the number of child processes is fixed (pm.max_children). |
| 53 | +; |
| 54 | +; dynamic - the number of child processes is set dynamically based on the following directives: |
| 55 | +; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. |
| 56 | +; |
| 57 | +; ondemand - the processes spawn on demand (when requested, as opposed to dynamic, where |
| 58 | +; pm.start_servers are started when the service is started. |
| 59 | +pm = ondemand |
| 60 | + |
| 61 | +; The maximum number of child processes to be created |
| 62 | +pm.max_children = 50 |
| 63 | + |
| 64 | +; The number of child processes created on startup. Used only when pm is set to dynamic. |
| 65 | +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. |
| 66 | +pm.start_servers = 4 |
| 67 | + |
| 68 | +; The desired minimum number of idle server processes. |
| 69 | +pm.min_spare_servers = 2 |
| 70 | + |
| 71 | +; The desired maximum number of idle server processes. |
| 72 | +pm.max_spare_servers = 6 |
| 73 | + |
| 74 | +; The number of requests each child process should execute before respawning. |
| 75 | +; This can be useful to work around memory leaks in 3rd party libraries. |
| 76 | +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. |
| 77 | +; Default value: 0. |
| 78 | +pm.max_requests = 500 |
| 79 | + |
| 80 | +; The number of seconds after which an idle process will be killed. Used only when pm is set to ondemand |
| 81 | +pm.process_idle_timeout = 10s |
| 82 | + |
| 83 | + |
| 84 | +; ############################################################ |
| 85 | +; Include |
| 86 | +; ############################################################ |
| 87 | + |
| 88 | + |
| 89 | +[global] |
| 90 | +include = /usr/local/etc/php-fpm.d/*.conf |
| 91 | + |
| 92 | + |
| 93 | +; ################################################################################ |
| 94 | +; #### |
| 95 | +; #### The following settings overwrite any includes again |
| 96 | +; #### |
| 97 | +; ################################################################################ |
| 98 | + |
| 99 | + |
| 100 | +; ############################################################ |
| 101 | +; Required for Dockerization |
| 102 | +; ############################################################ |
| 103 | + |
| 104 | +[global] |
| 105 | +daemonize = no |
| 106 | + |
| 107 | +[www] |
| 108 | +; Keep env variables set by docker |
| 109 | +clear_env = no |
| 110 | + |
| 111 | +; Redirect worker stdout and stderr into main error log. If not set, stdout and |
| 112 | +; stderr will be redirected to /dev/null according to FastCGI specs. |
| 113 | +; Note: on highloaded environement, this can cause some delay in the page |
| 114 | +; process time (several ms). |
| 115 | +; Default Value: no |
| 116 | +catch_workers_output = yes |
| 117 | + |
| 118 | + |
| 119 | +; ############################################################ |
| 120 | +; User and Group |
| 121 | +; ############################################################ |
| 122 | + |
| 123 | +[www] |
| 124 | +user = devilbox |
| 125 | +group = devilbox |
| 126 | + |
| 127 | + |
| 128 | +; ############################################################ |
| 129 | +; Networking |
| 130 | +; ############################################################ |
| 131 | + |
| 132 | +[www] |
| 133 | +; Ensure to listen here |
| 134 | +listen = 9000 |
0 commit comments