Mercurial > hg > nginx-site
comparison xml/en/docs/http/ngx_http_fastcgi_module.xml @ 995:c5ccf511346a
Documented the "fastcgi_buffering" directive.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Wed, 02 Oct 2013 13:41:26 +0400 |
parents | 95c3c3bbf1ce |
children | 2275611970dd |
comparison
equal
deleted
inserted
replaced
994:f09f77ef45e9 | 995:c5ccf511346a |
---|---|
8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> | 8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> |
9 | 9 |
10 <module name="Module ngx_http_fastcgi_module" | 10 <module name="Module ngx_http_fastcgi_module" |
11 link="/en/docs/http/ngx_http_fastcgi_module.html" | 11 link="/en/docs/http/ngx_http_fastcgi_module.html" |
12 lang="en" | 12 lang="en" |
13 rev="9"> | 13 rev="10"> |
14 | 14 |
15 <section id="summary"> | 15 <section id="summary"> |
16 | 16 |
17 <para> | 17 <para> |
18 The <literal>ngx_http_fastcgi_module</literal> module allows passing | 18 The <literal>ngx_http_fastcgi_module</literal> module allows passing |
82 </para> | 82 </para> |
83 | 83 |
84 </directive> | 84 </directive> |
85 | 85 |
86 | 86 |
87 <directive name="fastcgi_buffering"> | |
88 <syntax><literal>on</literal> | <literal>off</literal></syntax> | |
89 <default>on</default> | |
90 <context>http</context> | |
91 <context>server</context> | |
92 <context>location</context> | |
93 <appeared-in>1.5.6</appeared-in> | |
94 | |
95 <para> | |
96 Enables or disables buffering of responses from the FastCGI server. | |
97 </para> | |
98 | |
99 <para> | |
100 When buffering is enabled, nginx receives a response from the FastCGI server | |
101 as soon as possible, saving it into the buffers set by the | |
102 <link id="fastcgi_buffer_size"/> and <link id="fastcgi_buffers"/> directives. | |
103 If the whole response does not fit into memory, a part of it can be saved | |
104 to a <link id="fastcgi_temp_path">temporary file</link> on the disk. | |
105 Writing to temporary files is controlled by the | |
106 <link id="fastcgi_max_temp_file_size"/> and | |
107 <link id="fastcgi_temp_file_write_size"/> directives. | |
108 </para> | |
109 | |
110 <para> | |
111 When buffering is disabled, a response is passed to a client synchronously, | |
112 immediately as it is received. | |
113 nginx will not try to read the whole response from the FastCGI server. | |
114 The maximum size of the data that nginx can receive from the server | |
115 at a time is set by the <link id="fastcgi_buffer_size"/> directive. | |
116 </para> | |
117 | |
118 <para> | |
119 Buffering can also be enabled or disabled by passing | |
120 “<literal>yes</literal>” or “<literal>no</literal>” in the | |
121 <header>X-Accel-Buffering</header> response header field. | |
122 This capability can be disabled using the | |
123 <link id="fastcgi_ignore_headers"/> directive. | |
124 </para> | |
125 | |
126 </directive> | |
127 | |
128 | |
87 <directive name="fastcgi_buffers"> | 129 <directive name="fastcgi_buffers"> |
88 <syntax><value>number</value> <value>size</value></syntax> | 130 <syntax><value>number</value> <value>size</value></syntax> |
89 <default>8 4k|8k</default> | 131 <default>8 4k|8k</default> |
90 <context>http</context> | 132 <context>http</context> |
91 <context>server</context> | 133 <context>server</context> |
108 <context>http</context> | 150 <context>http</context> |
109 <context>server</context> | 151 <context>server</context> |
110 <context>location</context> | 152 <context>location</context> |
111 | 153 |
112 <para> | 154 <para> |
113 Limits the total <value>size</value> of buffers that | 155 When <link id="fastcgi_buffering">buffering</link> of responses from the FastCGI |
156 server is enabled, limits the total <value>size</value> of buffers that | |
114 can be busy sending a response to the client while the response is not | 157 can be busy sending a response to the client while the response is not |
115 yet fully read. | 158 yet fully read. |
116 In the mean time, the rest of the buffers can be used for reading a response | 159 In the mean time, the rest of the buffers can be used for reading a response |
117 and, if needed, buffering part of a response to a temporary file. | 160 and, if needed, buffering part of a response to a temporary file. |
118 By default, <value>size</value> is limited by the size of two buffers set by the | 161 By default, <value>size</value> is limited by the size of two buffers set by the |
539 limit</link> for transmission of a response to a client; | 582 limit</link> for transmission of a response to a client; |
540 </listitem> | 583 </listitem> |
541 | 584 |
542 <listitem> | 585 <listitem> |
543 <header>X-Accel-Buffering</header> enables or disables | 586 <header>X-Accel-Buffering</header> enables or disables |
544 buffering of a response; | 587 <link id="fastcgi_buffering">buffering</link> of a response; |
545 </listitem> | 588 </listitem> |
546 | 589 |
547 <listitem> | 590 <listitem> |
548 <header>X-Accel-Charset</header> sets the desired | 591 <header>X-Accel-Charset</header> sets the desired |
549 <link doc="ngx_http_charset_module.xml" id="charset"/> | 592 <link doc="ngx_http_charset_module.xml" id="charset"/> |
624 <context>http</context> | 667 <context>http</context> |
625 <context>server</context> | 668 <context>server</context> |
626 <context>location</context> | 669 <context>location</context> |
627 | 670 |
628 <para> | 671 <para> |
629 When the whole response does not fit into the memory buffers | 672 When <link id="fastcgi_buffering">buffering</link> of responses from the FastCGI |
673 server is enabled, and the whole response does not fit into the memory buffers | |
630 set by the <link id="fastcgi_buffer_size"/> and <link id="fastcgi_buffers"/> | 674 set by the <link id="fastcgi_buffer_size"/> and <link id="fastcgi_buffers"/> |
631 directives, a part of the response can be saved to a temporary file. | 675 directives, a part of the response can be saved to a temporary file. |
632 This directive sets the maximum <value>size</value> of a temporary file. | 676 This directive sets the maximum <value>size</value> of a temporary file. |
633 The size of data written to a temporary file at a time is set | 677 The size of data written to a temporary file at a time is set |
634 by the <link id="fastcgi_temp_file_write_size"/> directive. | 678 by the <link id="fastcgi_temp_file_write_size"/> directive. |