"Zero size buf" Error on file upload

Hi,

I have a nginx server doing ffmpeg video conversions, we’ve noticed if
we
upload a file around 100Mb in size it won’t upload and throws a “zero
buf”
error in nginx log; other logs not capture anything.

2014/01/31 22:18:49 [alert] 27455#0: *90757882 zero size buf in output
t:0
r:0 f:1 0000000000000000 0000000000000000-0000000000000000
00000000023B4E68
0-0 while sending request to upstream, client: 120.xxx.x.51, server:
www.video.domain.com, request: “POST /ajax/language HTTP/1.1”, upstream:
“fastcgi://127.0.0.1:9000”, host: “video.domain.com”, referrer:
http://video.domain.com/upload/video

This is also from wordpress install on the same server

2014/01/31 22:23:26 [alert] 27448#0: *90768658 zero size buf in output
t:0
r:0 f:1 0000000000000000 0000000000000000-0000000000000000
00000000024DB4D8
0-0 while sending request to upstream, client: xxx.61.14.155, server:
domain.com.au, request: “POST
/wp-cron.php?doing_wp_cron=1391225006.5313498973846435546875 HTTP/1.0”,
upstream: “fastcgi://127.0.0.1:9000”, host: “domain.com.au”

build:

nginx version: nginx/1.4.4
built by gcc 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC)
TLS SNI support enabled
configure arguments: --sbin-path=/usr/local/sbin --with-http_mp4_module
–with-http_flv_module --with-http_gzip_static_module
–with-http_gzip_stati
c_module --with-http_ssl_module --with-http_spdy_module
–with-http_secure_link_module --with-http_ssl_module

My worry is it’s a configuration error, we’ve had site admin edit our
config
as shown below, I see no changes though we still have large file problem
and
zero buffer error.

client_body_buffer_size 200m;
client_max_body_size 300m;

connection_pool_size 256;
client_header_timeout 10m;
client_body_timeout 10m;
send_timeout 10m;
keepalive_timeout     10;

#FastCGI

fastcgi_buffer_size 256k;
fastcgi_buffers 256 16k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
fastcgi_max_temp_file_size 0;
fastcgi_send_timeout 600;
fastcgi_read_timeout 600;
fastcgi_connect_timeout 120;
fastcgi_index  index.php;

Anyone had this error? I don’t find much here about it.

Posted at Nginx Forum:

Hello!

On Sat, Feb 01, 2014 at 12:01:17AM -0500, DamienR wrote:

“fastcgi://127.0.0.1:9000”, host: “video.domain.com”, referrer:

build:

nginx version: nginx/1.4.4
built by gcc 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC)
TLS SNI support enabled
configure arguments: --sbin-path=/usr/local/sbin --with-http_mp4_module
–with-http_flv_module --with-http_gzip_static_module --with-http_gzip_stati
c_module --with-http_ssl_module --with-http_spdy_module
–with-http_secure_link_module --with-http_ssl_module

Please try the following:

  1. Test if you see the problem in 1.5.9. There is at least one
    bug was fixed which may lead to “zero size buf in output” alerts.
    While it shouldn’t affect any real file uploads (it only happened
    on a requests with zero-sized body in some cases), testing with
    latest version is a good idea anyway.

  2. If spdy is actually used, try without it.

If it doesn’t help, please provide full configuration and a debug
log of a failed request, see Debugging | NGINX.


Maxim D.
http://nginx.org/