annotate xml/en/docs/ngx_core_module.xml @ 1695:aa95174efa80

Moved levels from error_log syntax to description.
author Maxim Dounin <mdounin@mdounin.ru>
date Wed, 04 May 2016 17:35:39 +0300
parents 6b4cb951cf83
children 147e3d0339e8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1 <?xml version="1.0"?>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2
580
be54c443235a Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents: 574
diff changeset
3 <!--
be54c443235a Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents: 574
diff changeset
4 Copyright (C) Igor Sysoev
be54c443235a Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents: 574
diff changeset
5 Copyright (C) Nginx, Inc.
be54c443235a Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents: 574
diff changeset
6 -->
be54c443235a Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents: 574
diff changeset
7
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
8 <!DOCTYPE module SYSTEM "../../../dtd/module.dtd">
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
9
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
10 <module name="Core functionality"
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
11 link="/en/docs/ngx_core_module.html"
589
764fbac1b8b4 Added document revision.
Ruslan Ermilov <ru@nginx.com>
parents: 580
diff changeset
12 lang="en"
1695
aa95174efa80 Moved levels from error_log syntax to description.
Maxim Dounin <mdounin@mdounin.ru>
parents: 1650
diff changeset
13 rev="18">
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
14
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
15 <section id="example" name="Example Configuration">
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
16
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
17 <para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
18 <example>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
19 user www www;
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
20 worker_processes 2;
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
21
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
22 error_log /var/log/nginx-error.log info;
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
23
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
24 events {
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
25 use kqueue;
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
26 worker_connections 2048;
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
27 }
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
28
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
29 ...
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
30 </example>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
31 </para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
32
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
33 </section>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
34
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
35
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
36 <section id="directives" name="Directives">
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
37
571
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
38 <directive name="accept_mutex">
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
39 <syntax><literal>on</literal> | <literal>off</literal></syntax>
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
40 <default>on</default>
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
41 <context>events</context>
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
42
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
43 <para>
957
6d9d4bb571a9 Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 953
diff changeset
44 If <literal>accept_mutex</literal> is enabled,
6d9d4bb571a9 Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 953
diff changeset
45 worker processes will accept new connections by turn.
571
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
46 Otherwise, all worker processes will be notified about new connections,
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
47 and if volume of new connections is low, some of the worker processes
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
48 may just waste system resources.
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
49 </para>
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
50
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
51 </directive>
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
52
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
53
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
54 <directive name="accept_mutex_delay">
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
55 <syntax><value>time</value></syntax>
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
56 <default>500ms</default>
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
57 <context>events</context>
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
58
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
59 <para>
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
60 If <link id="accept_mutex"/> is enabled, specifies the maximum time
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
61 during which a worker process will try to restart accepting new
957
6d9d4bb571a9 Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 953
diff changeset
62 connections if another worker process is currently accepting
6d9d4bb571a9 Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 953
diff changeset
63 new connections.
571
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
64 </para>
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
65
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
66 </directive>
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
67
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
68
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
69 <directive name="daemon">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
70 <syntax><literal>on</literal> | <literal>off</literal></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
71 <default>on</default>
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
72 <context>main</context>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
73
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
74 <para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
75 Determines whether nginx should become a daemon.
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
76 Mainly used during development.
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
77 </para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
78
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
79 </directive>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
80
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
81
516
8e1356bd281a Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 469
diff changeset
82 <directive name="debug_connection">
8e1356bd281a Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 469
diff changeset
83 <syntax>
8e1356bd281a Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 469
diff changeset
84 <value>address</value> |
8e1356bd281a Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 469
diff changeset
85 <value>CIDR</value> |
8e1356bd281a Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 469
diff changeset
86 <literal>unix:</literal></syntax>
8e1356bd281a Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 469
diff changeset
87 <default/>
8e1356bd281a Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 469
diff changeset
88 <context>events</context>
8e1356bd281a Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 469
diff changeset
89
8e1356bd281a Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 469
diff changeset
90 <para>
8e1356bd281a Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 469
diff changeset
91 Enables debugging log for selected client connections.
8e1356bd281a Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 469
diff changeset
92 Other connections will use logging level set by the
8e1356bd281a Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 469
diff changeset
93 <link id="error_log"/> directive.
523
a8daad8e83bb Documented 1.2.1 changes.
Ruslan Ermilov <ru@nginx.com>
parents: 516
diff changeset
94 Debugged connections are specified by IPv4 or IPv6 (1.3.0, 1.2.1)
a8daad8e83bb Documented 1.2.1 changes.
Ruslan Ermilov <ru@nginx.com>
parents: 516
diff changeset
95 address or network.
614
0526cac4637e Removed intimate details of the "debug_connection" directive's
Ruslan Ermilov <ru@nginx.com>
parents: 610
diff changeset
96 A connection may also be specified using a hostname.
523
a8daad8e83bb Documented 1.2.1 changes.
Ruslan Ermilov <ru@nginx.com>
parents: 516
diff changeset
97 For connections using UNIX-domain sockets (1.3.0, 1.2.1),
a8daad8e83bb Documented 1.2.1 changes.
Ruslan Ermilov <ru@nginx.com>
parents: 516
diff changeset
98 debugging log is enabled by the “<literal>unix:</literal>” parameter.
516
8e1356bd281a Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 469
diff changeset
99 <example>
8e1356bd281a Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 469
diff changeset
100 events {
8e1356bd281a Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 469
diff changeset
101 debug_connection 127.0.0.1;
8e1356bd281a Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 469
diff changeset
102 debug_connection localhost;
8e1356bd281a Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 469
diff changeset
103 debug_connection 192.0.2.0/24;
8e1356bd281a Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 469
diff changeset
104 debug_connection ::1;
8e1356bd281a Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 469
diff changeset
105 debug_connection 2001:0db8::/32;
8e1356bd281a Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 469
diff changeset
106 debug_connection unix:;
8e1356bd281a Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 469
diff changeset
107 ...
8e1356bd281a Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 469
diff changeset
108 }
8e1356bd281a Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 469
diff changeset
109 </example>
8e1356bd281a Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 469
diff changeset
110 <note>
8e1356bd281a Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 469
diff changeset
111 For this directive to work, nginx needs to
913
9a65d437da42 Link to "A debugging log" from "debug_connection" and "error_log".
Ruslan Ermilov <ru@nginx.com>
parents: 804
diff changeset
112 be built with <literal>--with-debug</literal>,
9a65d437da42 Link to "A debugging log" from "debug_connection" and "error_log".
Ruslan Ermilov <ru@nginx.com>
parents: 804
diff changeset
113 see “<link doc="debugging_log.xml"/>”.
516
8e1356bd281a Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 469
diff changeset
114 </note>
8e1356bd281a Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 469
diff changeset
115 </para>
8e1356bd281a Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 469
diff changeset
116
8e1356bd281a Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 469
diff changeset
117 </directive>
8e1356bd281a Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 469
diff changeset
118
8e1356bd281a Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 469
diff changeset
119
574
5e9ff979eac8 Documented debug_points.
Ruslan Ermilov <ru@nginx.com>
parents: 571
diff changeset
120 <directive name="debug_points">
5e9ff979eac8 Documented debug_points.
Ruslan Ermilov <ru@nginx.com>
parents: 571
diff changeset
121 <syntax><literal>abort</literal> | <literal>stop</literal></syntax>
5e9ff979eac8 Documented debug_points.
Ruslan Ermilov <ru@nginx.com>
parents: 571
diff changeset
122 <default/>
5e9ff979eac8 Documented debug_points.
Ruslan Ermilov <ru@nginx.com>
parents: 571
diff changeset
123 <context>main</context>
5e9ff979eac8 Documented debug_points.
Ruslan Ermilov <ru@nginx.com>
parents: 571
diff changeset
124
5e9ff979eac8 Documented debug_points.
Ruslan Ermilov <ru@nginx.com>
parents: 571
diff changeset
125 <para>
5e9ff979eac8 Documented debug_points.
Ruslan Ermilov <ru@nginx.com>
parents: 571
diff changeset
126 This directive is used for debugging.
5e9ff979eac8 Documented debug_points.
Ruslan Ermilov <ru@nginx.com>
parents: 571
diff changeset
127 </para>
5e9ff979eac8 Documented debug_points.
Ruslan Ermilov <ru@nginx.com>
parents: 571
diff changeset
128
5e9ff979eac8 Documented debug_points.
Ruslan Ermilov <ru@nginx.com>
parents: 571
diff changeset
129 <para>
5e9ff979eac8 Documented debug_points.
Ruslan Ermilov <ru@nginx.com>
parents: 571
diff changeset
130 When internal error is detected, e.g. the leak of sockets on
5e9ff979eac8 Documented debug_points.
Ruslan Ermilov <ru@nginx.com>
parents: 571
diff changeset
131 restart of working processes, enabling <literal>debug_points</literal>
5e9ff979eac8 Documented debug_points.
Ruslan Ermilov <ru@nginx.com>
parents: 571
diff changeset
132 leads to a core file creation (<literal>abort</literal>)
957
6d9d4bb571a9 Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 953
diff changeset
133 or to stopping of a process (<literal>stop</literal>) for further
574
5e9ff979eac8 Documented debug_points.
Ruslan Ermilov <ru@nginx.com>
parents: 571
diff changeset
134 analysis using a system debugger.
5e9ff979eac8 Documented debug_points.
Ruslan Ermilov <ru@nginx.com>
parents: 571
diff changeset
135 </para>
5e9ff979eac8 Documented debug_points.
Ruslan Ermilov <ru@nginx.com>
parents: 571
diff changeset
136
5e9ff979eac8 Documented debug_points.
Ruslan Ermilov <ru@nginx.com>
parents: 571
diff changeset
137 </directive>
5e9ff979eac8 Documented debug_points.
Ruslan Ermilov <ru@nginx.com>
parents: 571
diff changeset
138
5e9ff979eac8 Documented debug_points.
Ruslan Ermilov <ru@nginx.com>
parents: 571
diff changeset
139
158
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
140 <directive name="error_log">
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
141 <syntax>
953
aded7086e84f Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents: 935
diff changeset
142 <value>file</value> | <literal>stderr</literal> |
1449
c79501e16e26 Documented cyclic memory buffer support for error_log.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1436
diff changeset
143 <literal>syslog:</literal><literal>server</literal>=<value>address</value>[,<value>parameter</value>=<value>value</value>] |
c79501e16e26 Documented cyclic memory buffer support for error_log.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1436
diff changeset
144 <literal>memory:</literal><value>size</value>
1695
aa95174efa80 Moved levels from error_log syntax to description.
Maxim Dounin <mdounin@mdounin.ru>
parents: 1650
diff changeset
145 [<value>level</value>]</syntax>
158
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
146 <default>logs/error.log error</default>
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
147 <context>main</context>
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
148 <context>http</context>
1480
d1e1a8d34bce Documented mail support in error_log.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1465
diff changeset
149 <context>mail</context>
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1449
diff changeset
150 <context>stream</context>
158
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
151 <context>server</context>
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
152 <context>location</context>
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
153
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
154 <para>
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
155 Configures logging.
935
3860b37d56c0 Documented support for multiple "error_log" directives.
Vladimir Homutov <vl@nginx.com>
parents: 913
diff changeset
156 Several logs can be specified on the same level (1.5.2).
158
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
157 </para>
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
158
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
159 <para>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
160 The first parameter defines a file that will store the log.
158
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
161 <!--
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
162 If filename is not absolute, it is prefixed with the prefix path.
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
163 -->
455
571b790ddf9e error_log: documented the special value "stderr" and default logging level.
Ruslan Ermilov <ru@nginx.com>
parents: 444
diff changeset
164 The special value <literal>stderr</literal> selects the standard error file.
1285
4e89518a5999 Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents: 1205
diff changeset
165 Logging to <link doc="syslog.xml">syslog</link> can be configured by specifying
953
aded7086e84f Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents: 935
diff changeset
166 the “<literal>syslog:</literal>” prefix.
1449
c79501e16e26 Documented cyclic memory buffer support for error_log.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1436
diff changeset
167 Logging to a
c79501e16e26 Documented cyclic memory buffer support for error_log.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1436
diff changeset
168 <link doc="debugging_log.xml" id="memory">cyclic memory buffer</link>
c79501e16e26 Documented cyclic memory buffer support for error_log.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1436
diff changeset
169 can be configured by specifying the “<literal>memory:</literal>” prefix and
c79501e16e26 Documented cyclic memory buffer support for error_log.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1436
diff changeset
170 buffer <value>size</value>, and is generally used for debugging (1.7.11).
158
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
171 </para>
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
172
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
173 <para>
1695
aa95174efa80 Moved levels from error_log syntax to description.
Maxim Dounin <mdounin@mdounin.ru>
parents: 1650
diff changeset
174 The second parameter determines the <value>level</value> of logging,
aa95174efa80 Moved levels from error_log syntax to description.
Maxim Dounin <mdounin@mdounin.ru>
parents: 1650
diff changeset
175 and can be one of the following:
aa95174efa80 Moved levels from error_log syntax to description.
Maxim Dounin <mdounin@mdounin.ru>
parents: 1650
diff changeset
176 <literal>debug</literal>, <literal>info</literal>, <literal>notice</literal>,
aa95174efa80 Moved levels from error_log syntax to description.
Maxim Dounin <mdounin@mdounin.ru>
parents: 1650
diff changeset
177 <literal>warn</literal>, <literal>error</literal>, <literal>crit</literal>,
aa95174efa80 Moved levels from error_log syntax to description.
Maxim Dounin <mdounin@mdounin.ru>
parents: 1650
diff changeset
178 <literal>alert</literal>, or <literal>emerg</literal>.
158
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
179 Log levels above are listed in the order of increasing severity.
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
180 Setting a certain log level will cause all messages of
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
181 the specified and more severe log levels to be logged.
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
182 For example, the default level <literal>error</literal> will
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
183 cause <literal>error</literal>, <literal>crit</literal>,
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
184 <literal>alert</literal>, and <literal>emerg</literal> messages
158
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
185 to be logged.
455
571b790ddf9e error_log: documented the special value "stderr" and default logging level.
Ruslan Ermilov <ru@nginx.com>
parents: 444
diff changeset
186 If this parameter is omitted then <literal>error</literal> is used.
158
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
187 <note>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
188 For <literal>debug</literal> logging to work, nginx needs to
913
9a65d437da42 Link to "A debugging log" from "debug_connection" and "error_log".
Ruslan Ermilov <ru@nginx.com>
parents: 804
diff changeset
189 be built with <literal>--with-debug</literal>,
9a65d437da42 Link to "A debugging log" from "debug_connection" and "error_log".
Ruslan Ermilov <ru@nginx.com>
parents: 804
diff changeset
190 see “<link doc="debugging_log.xml"/>”.
158
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
191 </note>
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1449
diff changeset
192
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1449
diff changeset
193 <note>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1449
diff changeset
194 The directive can be specified on the
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1449
diff changeset
195 <literal>stream</literal> level
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1449
diff changeset
196 starting from version 1.7.11.
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1449
diff changeset
197 </note>
1480
d1e1a8d34bce Documented mail support in error_log.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1465
diff changeset
198
d1e1a8d34bce Documented mail support in error_log.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1465
diff changeset
199 <note>
d1e1a8d34bce Documented mail support in error_log.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1465
diff changeset
200 The directive can be specified on the
d1e1a8d34bce Documented mail support in error_log.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1465
diff changeset
201 <literal>mail</literal> level
d1e1a8d34bce Documented mail support in error_log.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1465
diff changeset
202 starting from version 1.9.0.
d1e1a8d34bce Documented mail support in error_log.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1465
diff changeset
203 </note>
158
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
204 </para>
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
205
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
206 </directive>
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
207
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
208
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
209 <directive name="env">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
210 <syntax><value>variable</value>[=<value>value</value>]</syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
211 <default>TZ</default>
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
212 <context>main</context>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
213
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
214 <para>
804
d22421dc5d00 Clarified the effects of the "env" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 764
diff changeset
215 By default, nginx removes all environment variables inherited
d22421dc5d00 Clarified the effects of the "env" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 764
diff changeset
216 from its parent process except the TZ variable.
957
6d9d4bb571a9 Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 953
diff changeset
217 This directive allows preserving some of the inherited variables,
6d9d4bb571a9 Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 953
diff changeset
218 changing their values, or creating new environment variables.
804
d22421dc5d00 Clarified the effects of the "env" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 764
diff changeset
219 These variables are then:
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
220 <list type="bullet">
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
221
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
222 <listitem>
804
d22421dc5d00 Clarified the effects of the "env" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 764
diff changeset
223 inherited during a <link doc="control.xml" id="upgrade">live upgrade</link>
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
224 of an executable file;
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
225 </listitem>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
226
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
227 <listitem>
957
6d9d4bb571a9 Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 953
diff changeset
228 used by the
6d9d4bb571a9 Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 953
diff changeset
229 <link doc="http/ngx_http_perl_module.xml">ngx_http_perl_module</link> module;
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
230 </listitem>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
231
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
232 <listitem>
804
d22421dc5d00 Clarified the effects of the "env" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 764
diff changeset
233 used by worker processes.
957
6d9d4bb571a9 Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 953
diff changeset
234 One should bear in mind that controlling system libraries in this way
6d9d4bb571a9 Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 953
diff changeset
235 is not always possible as it is common for libraries to check
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
236 variables only during initialization, well before they can be set
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
237 using this directive.
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
238 An exception from this is an above mentioned
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
239 <link doc="control.xml" id="upgrade">live upgrade</link>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
240 of an executable file.
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
241 </listitem>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
242
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
243 </list>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
244 </para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
245
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
246 <para>
957
6d9d4bb571a9 Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 953
diff changeset
247 The TZ variable is always inherited and available to the
6d9d4bb571a9 Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 953
diff changeset
248 <link doc="http/ngx_http_perl_module.xml">ngx_http_perl_module</link>
6d9d4bb571a9 Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 953
diff changeset
249 module, unless it is configured explicitly.
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
250 </para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
251
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
252 <para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
253 Usage example:
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
254 <example>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
255 env MALLOC_OPTIONS;
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
256 env PERL5LIB=/data/site/modules;
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
257 env OPENSSL_ALLOW_PROXY_CERTS=1;
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
258 </example>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
259 </para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
260
444
43c84d19bf92 Added a note about the NGINX environment variable.
Ruslan Ermilov <ru@nginx.com>
parents: 289
diff changeset
261 <para>
43c84d19bf92 Added a note about the NGINX environment variable.
Ruslan Ermilov <ru@nginx.com>
parents: 289
diff changeset
262 <note>
43c84d19bf92 Added a note about the NGINX environment variable.
Ruslan Ermilov <ru@nginx.com>
parents: 289
diff changeset
263 The NGINX environment variable is used internally by nginx
43c84d19bf92 Added a note about the NGINX environment variable.
Ruslan Ermilov <ru@nginx.com>
parents: 289
diff changeset
264 and should not be set directly by the user.
43c84d19bf92 Added a note about the NGINX environment variable.
Ruslan Ermilov <ru@nginx.com>
parents: 289
diff changeset
265 </note>
43c84d19bf92 Added a note about the NGINX environment variable.
Ruslan Ermilov <ru@nginx.com>
parents: 289
diff changeset
266 </para>
43c84d19bf92 Added a note about the NGINX environment variable.
Ruslan Ermilov <ru@nginx.com>
parents: 289
diff changeset
267
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
268 </directive>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
269
249
0f43f2c32c0b Fixed some nits.
Ruslan Ermilov <ru@nginx.com>
parents: 226
diff changeset
270
556
345012910707 Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 554
diff changeset
271 <directive name="events">
345012910707 Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 554
diff changeset
272 <syntax block="yes"/>
345012910707 Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 554
diff changeset
273 <default/>
345012910707 Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 554
diff changeset
274 <context>main</context>
345012910707 Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 554
diff changeset
275
345012910707 Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 554
diff changeset
276 <para>
957
6d9d4bb571a9 Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 953
diff changeset
277 Provides the configuration file context in which the directives that
556
345012910707 Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 554
diff changeset
278 affect connection processing are specified.
345012910707 Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 554
diff changeset
279 </para>
345012910707 Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 554
diff changeset
280
345012910707 Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 554
diff changeset
281 </directive>
345012910707 Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 554
diff changeset
282
345012910707 Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 554
diff changeset
283
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
284 <directive name="include">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
285 <syntax><value>file</value> | <value>mask</value></syntax>
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
286 <default/>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
287 <context/>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
288
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
289 <para>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
290 Includes another <value>file</value>, or files matching the
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
291 specified <value>mask</value>, into configuration.
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
292 Included files should consist of
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
293 syntactically correct directives and blocks.
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
294 </para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
295
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
296 <para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
297 Usage example:
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
298 <example>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
299 include mime.types;
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
300 include vhosts/*.conf;
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
301 </example>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
302 </para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
303
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
304 </directive>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
305
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
306
1650
6b4cb951cf83 Documented the load_module directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1641
diff changeset
307 <directive name="load_module">
6b4cb951cf83 Documented the load_module directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1641
diff changeset
308 <syntax><value>file</value></syntax>
6b4cb951cf83 Documented the load_module directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1641
diff changeset
309 <default/>
6b4cb951cf83 Documented the load_module directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1641
diff changeset
310 <context>main</context>
6b4cb951cf83 Documented the load_module directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1641
diff changeset
311 <appeared-in>1.9.11</appeared-in>
6b4cb951cf83 Documented the load_module directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1641
diff changeset
312
6b4cb951cf83 Documented the load_module directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1641
diff changeset
313 <para>
6b4cb951cf83 Documented the load_module directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1641
diff changeset
314 Loads a dynamic module.
6b4cb951cf83 Documented the load_module directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1641
diff changeset
315 </para>
6b4cb951cf83 Documented the load_module directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1641
diff changeset
316
6b4cb951cf83 Documented the load_module directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1641
diff changeset
317 <para>
6b4cb951cf83 Documented the load_module directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1641
diff changeset
318 Example:
6b4cb951cf83 Documented the load_module directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1641
diff changeset
319 <example>
6b4cb951cf83 Documented the load_module directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1641
diff changeset
320 load_module modules/ngx_mail_module.so;
6b4cb951cf83 Documented the load_module directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1641
diff changeset
321 </example>
6b4cb951cf83 Documented the load_module directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1641
diff changeset
322 </para>
6b4cb951cf83 Documented the load_module directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1641
diff changeset
323
6b4cb951cf83 Documented the load_module directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1641
diff changeset
324 </directive>
6b4cb951cf83 Documented the load_module directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1641
diff changeset
325
6b4cb951cf83 Documented the load_module directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1641
diff changeset
326
571
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
327 <directive name="lock_file">
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
328 <syntax><value>file</value></syntax>
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
329 <default>logs/nginx.lock</default>
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
330 <context>main</context>
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
331
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
332 <para>
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
333 nginx uses the locking mechanism to implement <link id="accept_mutex"/>
957
6d9d4bb571a9 Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 953
diff changeset
334 and serialize access to shared memory.
571
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
335 On most systems the locks are implemented using atomic operations,
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
336 and this directive is ignored.
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
337 On other systems the “lock file” mechanism is used.
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
338 This directive specifies a prefix for the names of lock files.
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
339 </para>
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
340
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
341 </directive>
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
342
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
343
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
344 <directive name="master_process">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
345 <syntax><literal>on</literal> | <literal>off</literal></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
346 <default>on</default>
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
347 <context>main</context>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
348
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
349 <para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
350 Determines whether worker processes are started.
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
351 This directive is intended for nginx developers.
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
352 </para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
353
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
354 </directive>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
355
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
356
571
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
357 <directive name="multi_accept">
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
358 <syntax><literal>on</literal> | <literal>off</literal></syntax>
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
359 <default>off</default>
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
360 <context>events</context>
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
361
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
362 <para>
957
6d9d4bb571a9 Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 953
diff changeset
363 If <literal>multi_accept</literal> is disabled, a worker process
571
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
364 will accept one new connection at a time.
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
365 Otherwise, a worker process
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
366 will accept all new connections at a time.
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
367 <note>
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
368 The directive is ignored if <link doc="events.xml" id="kqueue"/>
957
6d9d4bb571a9 Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 953
diff changeset
369 connection processing method is used, because it reports
571
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
370 the number of new connections waiting to be accepted.
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
371 </note>
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
372 </para>
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
373
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
374 </directive>
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
375
71d775bef043 Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents: 556
diff changeset
376
289
df261b1ce71f Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents: 271
diff changeset
377 <directive name="pcre_jit">
df261b1ce71f Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents: 271
diff changeset
378 <syntax><literal>on</literal> | <literal>off</literal></syntax>
df261b1ce71f Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents: 271
diff changeset
379 <default>off</default>
df261b1ce71f Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents: 271
diff changeset
380 <context>main</context>
df261b1ce71f Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents: 271
diff changeset
381 <appeared-in>1.1.12</appeared-in>
df261b1ce71f Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents: 271
diff changeset
382
df261b1ce71f Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents: 271
diff changeset
383 <para>
df261b1ce71f Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents: 271
diff changeset
384 Enables or disables the use of “just-in-time compilation” (PCRE JIT)
957
6d9d4bb571a9 Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 953
diff changeset
385 for the regular expressions known by the time of configuration parsing.
289
df261b1ce71f Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents: 271
diff changeset
386 </para>
df261b1ce71f Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents: 271
diff changeset
387
df261b1ce71f Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents: 271
diff changeset
388 <para>
df261b1ce71f Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents: 271
diff changeset
389 PCRE JIT can speed up processing of regular expressions significantly.
df261b1ce71f Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents: 271
diff changeset
390 <note>
df261b1ce71f Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents: 271
diff changeset
391 The JIT is available in PCRE libraries starting from version 8.20
df261b1ce71f Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents: 271
diff changeset
392 built with the <literal>--enable-jit</literal> configuration parameter.
957
6d9d4bb571a9 Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 953
diff changeset
393 When the PCRE library is built with nginx (<literal>--with-pcre=</literal>),
6d9d4bb571a9 Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 953
diff changeset
394 the JIT support is enabled via the
289
df261b1ce71f Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents: 271
diff changeset
395 <literal>--with-pcre-jit</literal> configuration parameter.
df261b1ce71f Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents: 271
diff changeset
396 </note>
df261b1ce71f Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents: 271
diff changeset
397 </para>
df261b1ce71f Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents: 271
diff changeset
398
df261b1ce71f Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents: 271
diff changeset
399 </directive>
df261b1ce71f Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents: 271
diff changeset
400
df261b1ce71f Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents: 271
diff changeset
401
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
402 <directive name="pid">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
403 <syntax><value>file</value></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
404 <default>nginx.pid</default>
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
405 <context>main</context>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
406
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
407 <para>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
408 Defines a <value>file</value> that will store the process ID of the main process.
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
409 </para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
410
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
411 </directive>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
412
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
413
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
414 <directive name="ssl_engine">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
415 <syntax><value>device</value></syntax>
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
416 <default/>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
417 <context>main</context>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
418
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
419 <para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
420 Defines the name of the hardware SSL accelerator.
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
421 </para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
422
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
423 </directive>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
424
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
425
1436
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1285
diff changeset
426 <directive name="thread_pool">
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1285
diff changeset
427 <syntax>
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1285
diff changeset
428 <value>name</value>
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1285
diff changeset
429 <literal>threads</literal>=<value>number</value>
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1285
diff changeset
430 [<literal>max_queue</literal>=<value>number</value>]</syntax>
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1285
diff changeset
431 <default>default threads=32 max_queue=65536</default>
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1285
diff changeset
432 <context>main</context>
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1285
diff changeset
433 <appeared-in>1.7.11</appeared-in>
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1285
diff changeset
434
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1285
diff changeset
435 <para>
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1285
diff changeset
436 Defines named thread pools
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1285
diff changeset
437 used for multi-threaded reading and sending of files
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1285
diff changeset
438 <link doc="http/ngx_http_core_module.xml" id="aio">without blocking</link>
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1285
diff changeset
439 worker processes.
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1285
diff changeset
440 </para>
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1285
diff changeset
441
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1285
diff changeset
442 <para>
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1285
diff changeset
443 The <literal>threads</literal> parameter
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1285
diff changeset
444 defines the number of threads in the pool.
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1285
diff changeset
445 </para>
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1285
diff changeset
446
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1285
diff changeset
447 <para>
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1285
diff changeset
448 In the event that all threads in the pool are busy,
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1285
diff changeset
449 a new task will wait in the queue.
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1285
diff changeset
450 The <literal>max_queue</literal> parameter limits the number
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1285
diff changeset
451 of tasks allowed to be waiting in the queue.
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1285
diff changeset
452 By default, up to 65536 tasks can wait in the queue.
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1285
diff changeset
453 When the queue overflows, the task is completed with an error.
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1285
diff changeset
454 </para>
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1285
diff changeset
455
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1285
diff changeset
456 </directive>
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1285
diff changeset
457
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1285
diff changeset
458
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
459 <directive name="timer_resolution">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
460 <syntax><value>interval</value></syntax>
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
461 <default/>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
462 <context>main</context>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
463
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
464 <para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
465 Reduces timer resolution in worker processes, thus reducing the
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
466 number of <c-func>gettimeofday</c-func> system calls made.
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
467 By default, <c-func>gettimeofday</c-func> is called each time
957
6d9d4bb571a9 Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 953
diff changeset
468 a kernel event is received.
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
469 With reduced resolution, <c-func>gettimeofday</c-func> is only
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
470 called once per specified <value>interval</value>.
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
471 </para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
472
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
473 <para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
474 Example:
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
475 <example>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
476 timer_resolution 100ms;
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
477 </example>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
478 </para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
479
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
480 <para>
957
6d9d4bb571a9 Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 953
diff changeset
481 Internal implementation of the interval depends on the method used:
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
482 <list type="bullet">
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
483
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
484 <listitem>
957
6d9d4bb571a9 Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 953
diff changeset
485 the <c-def>EVFILT_TIMER</c-def> filter if <literal>kqueue</literal> is used;
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
486 </listitem>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
487
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
488 <listitem>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
489 <c-func>timer_create</c-func> if <literal>eventport</literal> is used;
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
490 </listitem>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
491
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
492 <listitem>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
493 <c-func>setitimer</c-func> otherwise.
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
494 </listitem>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
495
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
496 </list>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
497 </para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
498
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
499 </directive>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
500
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
501
556
345012910707 Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 554
diff changeset
502 <directive name="use">
345012910707 Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 554
diff changeset
503 <syntax><value>method</value></syntax>
345012910707 Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 554
diff changeset
504 <default/>
345012910707 Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 554
diff changeset
505 <context>events</context>
345012910707 Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 554
diff changeset
506
345012910707 Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 554
diff changeset
507 <para>
345012910707 Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 554
diff changeset
508 Specifies the <link doc="events.xml">connection processing</link>
345012910707 Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 554
diff changeset
509 <value>method</value> to use.
957
6d9d4bb571a9 Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 953
diff changeset
510 There is normally no need to specify it explicitly, because nginx will
556
345012910707 Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 554
diff changeset
511 by default use the most efficient method.
345012910707 Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 554
diff changeset
512 </para>
345012910707 Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 554
diff changeset
513
345012910707 Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 554
diff changeset
514 </directive>
345012910707 Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 554
diff changeset
515
345012910707 Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 554
diff changeset
516
82
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
517 <directive name="user">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
518 <syntax><value>user</value> [<value>group</value>]</syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
519 <default>nobody nobody</default>
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
520 <context>main</context>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
521
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
522 <para>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
523 Defines <value>user</value> and <value>group</value>
82
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
524 credentials used by worker processes.
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
525 If <value>group</value> is omitted, a group whose name equals
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
526 that of <value>user</value> is used.
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
527 </para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
528
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
529 </directive>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
530
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
531
749
2abb92a19101 Documented 'worker_aio_requests' directive.
Vladimir Homutov <vl@nginx.com>
parents: 742
diff changeset
532 <directive name="worker_aio_requests">
2abb92a19101 Documented 'worker_aio_requests' directive.
Vladimir Homutov <vl@nginx.com>
parents: 742
diff changeset
533 <syntax><value>number</value></syntax>
2abb92a19101 Documented 'worker_aio_requests' directive.
Vladimir Homutov <vl@nginx.com>
parents: 742
diff changeset
534 <default>32</default>
2abb92a19101 Documented 'worker_aio_requests' directive.
Vladimir Homutov <vl@nginx.com>
parents: 742
diff changeset
535 <context>events</context>
750
6a1b1ba62cab Documented history of "worker_aio_requests" directive.
Vladimir Homutov <vl@nginx.com>
parents: 749
diff changeset
536 <appeared-in>1.1.4</appeared-in>
6a1b1ba62cab Documented history of "worker_aio_requests" directive.
Vladimir Homutov <vl@nginx.com>
parents: 749
diff changeset
537 <appeared-in>1.0.7</appeared-in>
749
2abb92a19101 Documented 'worker_aio_requests' directive.
Vladimir Homutov <vl@nginx.com>
parents: 742
diff changeset
538
2abb92a19101 Documented 'worker_aio_requests' directive.
Vladimir Homutov <vl@nginx.com>
parents: 742
diff changeset
539 <para>
2abb92a19101 Documented 'worker_aio_requests' directive.
Vladimir Homutov <vl@nginx.com>
parents: 742
diff changeset
540 When using <link doc="http/ngx_http_core_module.xml" id="aio"/>
2abb92a19101 Documented 'worker_aio_requests' directive.
Vladimir Homutov <vl@nginx.com>
parents: 742
diff changeset
541 with the <link doc="../docs/events.xml" id="epoll"/>
2abb92a19101 Documented 'worker_aio_requests' directive.
Vladimir Homutov <vl@nginx.com>
parents: 742
diff changeset
542 connection processing method, sets the maximum <value>number</value> of
2abb92a19101 Documented 'worker_aio_requests' directive.
Vladimir Homutov <vl@nginx.com>
parents: 742
diff changeset
543 outstanding asynchronous I/O operations
2abb92a19101 Documented 'worker_aio_requests' directive.
Vladimir Homutov <vl@nginx.com>
parents: 742
diff changeset
544 for a single worker process.
2abb92a19101 Documented 'worker_aio_requests' directive.
Vladimir Homutov <vl@nginx.com>
parents: 742
diff changeset
545 </para>
2abb92a19101 Documented 'worker_aio_requests' directive.
Vladimir Homutov <vl@nginx.com>
parents: 742
diff changeset
546
2abb92a19101 Documented 'worker_aio_requests' directive.
Vladimir Homutov <vl@nginx.com>
parents: 742
diff changeset
547 </directive>
2abb92a19101 Documented 'worker_aio_requests' directive.
Vladimir Homutov <vl@nginx.com>
parents: 742
diff changeset
548
2abb92a19101 Documented 'worker_aio_requests' directive.
Vladimir Homutov <vl@nginx.com>
parents: 742
diff changeset
549
545
e97b46d1842d Documented the "worker_connections" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 523
diff changeset
550 <directive name="worker_connections">
e97b46d1842d Documented the "worker_connections" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 523
diff changeset
551 <syntax><value>number</value></syntax>
e97b46d1842d Documented the "worker_connections" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 523
diff changeset
552 <default>512</default>
e97b46d1842d Documented the "worker_connections" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 523
diff changeset
553 <context>events</context>
e97b46d1842d Documented the "worker_connections" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 523
diff changeset
554
e97b46d1842d Documented the "worker_connections" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 523
diff changeset
555 <para>
e97b46d1842d Documented the "worker_connections" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 523
diff changeset
556 Sets the maximum number of simultaneous connections that
e97b46d1842d Documented the "worker_connections" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 523
diff changeset
557 can be opened by a worker process.
e97b46d1842d Documented the "worker_connections" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 523
diff changeset
558 </para>
e97b46d1842d Documented the "worker_connections" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 523
diff changeset
559
e97b46d1842d Documented the "worker_connections" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 523
diff changeset
560 <para>
e97b46d1842d Documented the "worker_connections" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 523
diff changeset
561 It should be kept in mind that this number includes all connections
957
6d9d4bb571a9 Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 953
diff changeset
562 (e.g. connections with proxied servers, among others),
545
e97b46d1842d Documented the "worker_connections" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 523
diff changeset
563 not only connections with clients.
e97b46d1842d Documented the "worker_connections" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 523
diff changeset
564 Another consideration is that the actual number of simultaneous
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 957
diff changeset
565 connections cannot exceed the current limit on
957
6d9d4bb571a9 Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 953
diff changeset
566 the maximum number of open files, which can be changed by
545
e97b46d1842d Documented the "worker_connections" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 523
diff changeset
567 <link id="worker_rlimit_nofile"/>.
e97b46d1842d Documented the "worker_connections" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 523
diff changeset
568 </para>
e97b46d1842d Documented the "worker_connections" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 523
diff changeset
569
e97b46d1842d Documented the "worker_connections" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 523
diff changeset
570 </directive>
e97b46d1842d Documented the "worker_connections" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 523
diff changeset
571
e97b46d1842d Documented the "worker_connections" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 523
diff changeset
572
469
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
573 <directive name="worker_cpu_affinity">
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
574 <syntax><value>cpumask</value> ...</syntax>
1641
c0d1026e7e7b Documented the "auto" parameter in worker_cpu_affinity.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1480
diff changeset
575 <syntax><literal>auto</literal> [<value>cpumask</value>]</syntax>
469
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
576 <default/>
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
577 <context>main</context>
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
578
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
579 <para>
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
580 Binds worker processes to the sets of CPUs.
957
6d9d4bb571a9 Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 953
diff changeset
581 Each CPU set is represented by a bitmask of allowed CPUs.
469
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
582 There should be a separate set defined for each of the worker processes.
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
583 By default, worker processes are not bound to any specific CPUs.
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
584 </para>
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
585
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
586 <para>
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
587 For example,
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
588 <example>
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
589 worker_processes 4;
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
590 worker_cpu_affinity 0001 0010 0100 1000;
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
591 </example>
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
592 binds each worker process to a separate CPU, while
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
593 <example>
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
594 worker_processes 2;
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
595 worker_cpu_affinity 0101 1010;
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
596 </example>
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
597 binds the first worker process to CPU0/CPU2,
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
598 and the second worker process to CPU1/CPU3.
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
599 The second example is suitable for hyper-threading.
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
600 </para>
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
601
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
602 <para>
1641
c0d1026e7e7b Documented the "auto" parameter in worker_cpu_affinity.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1480
diff changeset
603 The special value <literal>auto</literal> (1.9.10) allows
c0d1026e7e7b Documented the "auto" parameter in worker_cpu_affinity.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1480
diff changeset
604 binding worker processes automatically to available CPUs:
c0d1026e7e7b Documented the "auto" parameter in worker_cpu_affinity.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1480
diff changeset
605 <example>
c0d1026e7e7b Documented the "auto" parameter in worker_cpu_affinity.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1480
diff changeset
606 worker_processes auto;
c0d1026e7e7b Documented the "auto" parameter in worker_cpu_affinity.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1480
diff changeset
607 worker_cpu_affinity auto;
c0d1026e7e7b Documented the "auto" parameter in worker_cpu_affinity.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1480
diff changeset
608 </example>
c0d1026e7e7b Documented the "auto" parameter in worker_cpu_affinity.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1480
diff changeset
609 The optional mask parameter can be used to limit the CPUs
c0d1026e7e7b Documented the "auto" parameter in worker_cpu_affinity.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1480
diff changeset
610 available for automatic binding:
c0d1026e7e7b Documented the "auto" parameter in worker_cpu_affinity.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1480
diff changeset
611 <example>
c0d1026e7e7b Documented the "auto" parameter in worker_cpu_affinity.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1480
diff changeset
612 worker_cpu_affinity auto 01010101;
c0d1026e7e7b Documented the "auto" parameter in worker_cpu_affinity.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1480
diff changeset
613 </example>
c0d1026e7e7b Documented the "auto" parameter in worker_cpu_affinity.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1480
diff changeset
614 </para>
c0d1026e7e7b Documented the "auto" parameter in worker_cpu_affinity.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1480
diff changeset
615
c0d1026e7e7b Documented the "auto" parameter in worker_cpu_affinity.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1480
diff changeset
616 <para>
469
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
617 <note>
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
618 The directive is only available on FreeBSD and Linux.
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
619 </note>
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
620 </para>
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
621
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
622 </directive>
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
623
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
624
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
625 <directive name="worker_priority">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
626 <syntax><value>number</value></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
627 <default>0</default>
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
628 <context>main</context>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
629
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
630 <para>
957
6d9d4bb571a9 Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 953
diff changeset
631 Defines the scheduling priority for worker processes like it is
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
632 done by the <command>nice</command> command: a negative
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
633 <value>number</value>
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
634 means higher priority.
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
635 Allowed range normally varies from -20 to 20.
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
636 </para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
637
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
638 <para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
639 Example:
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
640 <example>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
641 worker_priority -10;
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
642 </example>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
643 </para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
644
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
645 </directive>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
646
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
647
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
648 <directive name="worker_processes">
740
46d70031bea9 Documented the recently added "auto" parameter of the
Andrey Belov <defan@nginx.com>
parents: 659
diff changeset
649 <syntax><value>number</value> | <literal>auto</literal></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
650 <default>1</default>
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
651 <context>main</context>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
652
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
653 <para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
654 Defines the number of worker processes.
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
655 </para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
656
226
c4b33b07dcfe Added some basic hints on how to tune "worker_processes".
Ruslan Ermilov <ru@nginx.com>
parents: 158
diff changeset
657 <para>
c4b33b07dcfe Added some basic hints on how to tune "worker_processes".
Ruslan Ermilov <ru@nginx.com>
parents: 158
diff changeset
658 The optimal value depends on many factors including (but not
c4b33b07dcfe Added some basic hints on how to tune "worker_processes".
Ruslan Ermilov <ru@nginx.com>
parents: 158
diff changeset
659 limited to) the number of CPU cores, the number of hard disk
c4b33b07dcfe Added some basic hints on how to tune "worker_processes".
Ruslan Ermilov <ru@nginx.com>
parents: 158
diff changeset
660 drives that store data, and load pattern.
957
6d9d4bb571a9 Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 953
diff changeset
661 When one is in doubt, setting it to the number of available CPU cores
740
46d70031bea9 Documented the recently added "auto" parameter of the
Andrey Belov <defan@nginx.com>
parents: 659
diff changeset
662 would be a good start (the value “<literal>auto</literal>”
46d70031bea9 Documented the recently added "auto" parameter of the
Andrey Belov <defan@nginx.com>
parents: 659
diff changeset
663 will try to autodetect it).
742
3a2e35f4c279 Documented that "worker_processes auto" appeared in version 1.3.8.
Ruslan Ermilov <ru@nginx.com>
parents: 740
diff changeset
664 <note>
3a2e35f4c279 Documented that "worker_processes auto" appeared in version 1.3.8.
Ruslan Ermilov <ru@nginx.com>
parents: 740
diff changeset
665 The <literal>auto</literal> parameter is supported starting from
764
f8434fdd3cd9 The "auto" parameter of the ""worker_processes" directive
Ruslan Ermilov <ru@nginx.com>
parents: 750
diff changeset
666 versions 1.3.8 and 1.2.5.
742
3a2e35f4c279 Documented that "worker_processes auto" appeared in version 1.3.8.
Ruslan Ermilov <ru@nginx.com>
parents: 740
diff changeset
667 </note>
226
c4b33b07dcfe Added some basic hints on how to tune "worker_processes".
Ruslan Ermilov <ru@nginx.com>
parents: 158
diff changeset
668 </para>
c4b33b07dcfe Added some basic hints on how to tune "worker_processes".
Ruslan Ermilov <ru@nginx.com>
parents: 158
diff changeset
669
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
670 </directive>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
671
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
672
82
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
673 <directive name="worker_rlimit_core">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
674 <syntax><value>size</value></syntax>
82
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
675 <default/>
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
676 <context>main</context>
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
677
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
678 <para>
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
679 Changes the limit on the largest size of a core file
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
680 (<c-def>RLIMIT_CORE</c-def>) for worker processes.
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
681 Used to increase the limit without restarting the main process.
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
682 </para>
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
683
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
684 </directive>
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
685
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
686
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
687 <directive name="worker_rlimit_nofile">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
688 <syntax><value>number</value></syntax>
82
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
689 <default/>
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
690 <context>main</context>
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
691
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
692 <para>
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
693 Changes the limit on the maximum number of open files
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
694 (<c-def>RLIMIT_NOFILE</c-def>) for worker processes.
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
695 Used to increase the limit without restarting the main process.
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
696 </para>
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
697
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
698 </directive>
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
699
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
700
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
701 <directive name="working_directory">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
702 <syntax><value>directory</value></syntax>
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
703 <default/>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
704 <context>main</context>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
705
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
706 <para>
957
6d9d4bb571a9 Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 953
diff changeset
707 Defines the current working directory for a worker process.
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
708 It is primarily used when writing a core-file, in which case
262
676abe405aba Changed one instance of "working process" to "worker process".
Ruslan Ermilov <ru@nginx.com>
parents: 249
diff changeset
709 a worker process should have write permission for the
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
710 specified directory.
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
711 </para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
712
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
713 </directive>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
714
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
715 </section>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
716
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
717 </module>