Opened 7 years ago

Closed 6 years ago

#159 closed enhancement (fixed)

Implement fcgi_buffering option

Reported by: dziastinux@… Owned by: somebody
Priority: major Milestone:
Component: nginx-core Version: 1.0.x
Keywords: Cc:
uname -a: Linux umap-generator 2.6.32-220.13.1.el6.x86_64 #1 SMP Tue Apr 17 23:56:34 BST 2012 x86_64 x86_64 x86_64 GNU/Linux
nginx -V: nginx version: nginx/1.0.14 built by gcc 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC) TLS SNI support enabled configure arguments: --prefix=/etc/nginx/ --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/ --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-mail --with-mail_ssl_module --with-file-aio --with-ipv6 --add-module=header-more-0.16 --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic'


It would be nice to have an option to disable fcgi buffering.


  • fastcgi_max_temp_file_size supports '0' value;
  • fastcgi_buffer_size throws error if fcgi header is bigger than specified value.

Change History (3)

comment:1 Changed 7 years ago by dziastinux@…

Just for the record, the following options already exists:

  • scgi_buffering;
  • uwsgi_buffering;
  • proxy_buffering;

comment:2 Changed 7 years ago by artyom.beilis@…

I'm second to vote about this ticket.

Please note, without this option it is impossible to implement several important COMET techniques.

For example HTML5 EventSource? or other methods like hidden iframe.

In Event streaming it is common to flush small buffers to the stream, so flushing, at least at the level of FastCGI record boundaries would very useful.

Note, other web servers support such an option, for example Apache has -flush option, lighttpd does this by default.

I would even consider this as a bug.


Artyom Beilis

comment:3 Changed 6 years ago by mdounin

  • Resolution set to fixed
  • sensitive set to 0
  • Status changed from new to closed

Non-buffered mode support for fastcgi introduced by 8c827bb1b2b6.

Note: See TracTickets for help on using tickets.