ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

проблема с gzip?


  • To: nginx-ru@xxxxxxxxx
  • Subject: проблема с gzip?
  • From: Aln Kapa <alnkapa@xxxxxxxxx>
  • Date: Mon, 26 Nov 2012 13:16:45 +0400
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=5W+BCGLUeL+R24hvbSiiv11ouj+OQycwRgGKZ467mtE=; b=YvJIzDItoZYS5dHtlG8fV8IKwD6Q9fVwXlhzTmbY+12fmf4JJlZKzxRXfKxb69hR18 +Ty8eoJxmz2RtFkAGtJpCiF1kmWQdACuWFFQK7JRK0L0oOqQmL3jMYknZOo0RKLb+Jmb bB000k0UUEFxlNYt/GtnhE0fd07wYwFOWlaJiKTIduwCHZXWXtNQNdcRrMudq0gqbvSC vqjp2NmV00Uzdeo9xsoBuu5mmQimgE2MRTJ0w9ZBoTQidpo/gjnER2kCQVE65HGhEexH vNZ5z7+B334I7vC6l3y6Lp1Jqqsqdyej+8VJ08uMOYPTGumS9Zq3eGWYgTRszwwj3XZP CvcQ==

Проблема такая есть конфигурация php-fpm(PHP 5.4.4-9) ->nginx->haproxy(1.4.15),

nginx version: nginx/1.2.1
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx
--conf-path=/etc/nginx/nginx.conf
--error-log-path=/var/log/nginx/error.log
--http-client-body-temp-path=/var/lib/nginx/body
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi
--http-log-path=/var/log/nginx/access.log
--http-proxy-temp-path=/var/lib/nginx/proxy
--http-scgi-temp-path=/var/lib/nginx/scgi
--http-uwsgi-temp-path=/var/lib/nginx/uwsgi
--lock-path=/var/lock/nginx.lock --pid-path=/var/run/nginx.pid
--with-pcre-jit --with-debug --with-http_addition_module
--with-http_dav_module --with-http_flv_module --with-http_geoip_module
--with-http_gzip_static_module --with-http_image_filter_module
--with-http_mp4_module --with-http_perl_module
--with-http_random_index_module --with-http_realip_module
--with-http_secure_link_module --with-http_stub_status_module
--with-http_ssl_module --with-http_sub_module --with-http_xslt_module
--with-ipv6 --with-sha1=/usr/include/openssl
--with-md5=/usr/include/openssl --with-mail --with-mail_ssl_module
--add-module=/tmp/buildd/nginx-1.2.1/debian/modules/nginx-auth-pam
--add-module=/tmp/buildd/nginx-1.2.1/debian/modules/chunkin-nginx-module
--add-module=/tmp/buildd/nginx-1.2.1/debian/modules/headers-more-nginx-module
--add-module=/tmp/buildd/nginx-1.2.1/debian/modules/nginx-development-kit
--add-module=/tmp/buildd/nginx-1.2.1/debian/modules/nginx-echo
--add-module=/tmp/buildd/nginx-1.2.1/debian/modules/nginx-http-push
--add-module=/tmp/buildd/nginx-1.2.1/debian/modules/nginx-lua
--add-module=/tmp/buildd/nginx-1.2.1/debian/modules/nginx-upload-module
--add-module=/tmp/buildd/nginx-1.2.1/debian/modules/nginx-upload-progress
--add-module=/tmp/buildd/nginx-1.2.1/debian/modules/nginx-upstream-fair
--add-module=/tmp/buildd/nginx-1.2.1/debian/modules/nginx-dav-ext-module

/etc/nginx/nginx.conf

user www-data;
worker_processes 10;
pid /var/run/nginx.pid;
error_log  /var/log/nginx/error.log;

events {
    worker_connections  4096;
    # multi_accept on;
}

http {
    server_tokens off;
    set_real_ip_from 127.0.0.1;
    tcp_nopush on;
    tcp_nodelay on;
    include /etc/nginx/mime.types;
    default_type application/octet-stream;
    gzip on;
    gzip_disable "msie6";
    gzip_vary on;
    gzip_proxied any;
    gzip_comp_level 9;
    gzip_buffers 16 8k;
    gzip_http_version 1.1;
    gzip_types text/plain text/css application/json
application/x-javascript text/xml application/xml application/xml+rss
text/javascript application/octet-stream;
    sendfile on;
    keepalive_timeout 180;
    log_format gzip '$remote_addr - $remote_user [$time_local] '
                '"$request" $status $bytes_sent '
                '"$http_referer" "$http_user_agent" "$gzip_ratio"';
    include /etc/nginx/conf.d/*.conf;
    include /etc/nginx/sites-enabled/*;
}

Проблема такая nginx  отдает данные не целиком, в логах написано так:
2012/11/26 12:42:41 [error] 32163#0: *42 upstream sent unsupported
FastCGI protocol version: 0 while reading upstream, client:
xxx.xxx.xxx.xxx, server: xxx.xxx.xx, request: "POST /object/update
HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm-my.sock:",
host: "xxx.xxx.xx", referrer: "http://xxx.xxx.xx/map";
Но если выключить сжатие gzip off; то все начинает работать нормально
и данные приходят целиком, происходит это только на данных в
приатаченном файле, со всем остальным проблем нет.

Attachment: json.data.gz
Description: GNU Zip compressed data

_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://mailman.nginx.org/mailman/listinfo/nginx-ru


 




Copyright © Lexa Software, 1996-2009.