Request big JS file very slow if enable gzip on

Dewangga dewanggaba at xtremenitro.org
Mon Oct 27 03:29:46 UTC 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Have you tried to put `gzip_comp_level` on level 9? Based on
http://nginx.org/en/docs/http/ngx_http_gzip_module.html#gzip_comp_level

And tried to put `gzip_proxied any`
http://nginx.org/en/docs/http/ngx_http_gzip_module.html#gzip_proxied

On 10/27/2014 10:04, colky wrote:
> Sorry about everyone, i posted in another forum but not got any
> response, really really hope can got your all help about the issue
> which already confuse me many days.
> 
> I installed nginx-1.6.2-1.el6.ngx.x86_64 with yum on CentOS 6.5
> system. below are my settings:
> 
> nginx.conf 
> --------------------------------------------------------------------------------------------------------------
>
> 
http {
> error_log /var/log/nginx/error.log debug;
> 
> ............. #added limit_conn_zone $binary_remote_addr
> zone=addr:10m; gzip on; gzip_types text/plain text/css
> application/json application/x-javascript text/xml application/xml
> application/xml+rss text/javascript;
> 
> upstream szsmk_dev { ip_hash; server 172.17.3.22:28080; server
> 172.17.3.22:28180; }
> 
> 
> server { listen 172.17.3.22:80 default_server;
> 
> location /wx/js/ { root
> /home/developer/jboss/server/citycard_dev/deploy/citycard.war/; } 
> location /wx/css/ { root
> /home/developer/jboss/server/citycard_dev/deploy/citycard.war/; }
> 
> 
> 
> location / { limit_conn addr 1000; proxy_pass http://szsmk_dev; }
> 
> }
> 
> } 
> --------------------------------------------------------------------------------------------------------------
>
> 
for others settings all are default.
> 
> Test page: http://dev.szsmk.com/wx/ticket/index Test browser:
> Chrome (disabled cache)
> 
> when i disabled gzip and everything runs well, but if set gzip as
> on, i got below 3 different results if refresh the page in chrome.
> 
> 1. very slow to load (80%) Most times the page will need more than
> 20 ~ 60 seconds to be loaded. I checked and found mostly were
> blocked by http://dev.szsmk.com/wx/js/libs/jquery-ui-1.10.3.min.js
> (222KB) and http://dev.szsmk.com/wx/js/libs/angular/angular.min.js
> (105KB). For all other files which little than 100kb load very
> fast.
> 
> error.log: 2014/10/26 20:44:30 [info] 20917#0: *80 client
> 49.73.183.141 closed keepalive connection 2014/10/26 20:44:30
> [info] 20917#0: *83 client 49.73.183.141 closed keepalive
> connection 2014/10/26 20:44:30 [info] 20917#0: *82 client
> 49.73.183.141 closed keepalive connection 2014/10/26 20:44:30
> [info] 20917#0: *85 client 49.73.183.141 closed keepalive
> connection
> 
> 2. Response error: (10%)
> 
> for jquery-ui-1.10.3.min.js or angular.min.js, often got below
> error when request:
> 
> in browser shows: "(failed) net::ERR_EMPTY_RESPONSE"
> 
> 
> in error.log shows: 2014/10/26 20:27:13 [info] 20917#0: *28 client
> prematurely closed connection (104: Connection reset by peer) while
> sending response to client, client: 49.73.183.141, server: ,
> request: "GET /wx/js/libs/jquery-ui-1.10.3.min.js HTTP/1.1", host:
> "dev.szsmk.com", referrer: "http://dev.szsmk.com/wx/ticket/index"
> 
> 
> 3. load success(10%) Sometimes i will can load the page success
> within 10 seconds
> 
> Anybody can tell me how to enable gzip and resolve the issue?
> 
> Posted at Nginx Forum:
> http://forum.nginx.org/read.php?2,254292,254292#msg-254292
> 
> _______________________________________________ nginx mailing list 
> nginx at nginx.org http://mailman.nginx.org/mailman/listinfo/nginx
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)

iQEcBAEBAgAGBQJUTbwpAAoJEF1+odKB6YIxsrAIALTHByADso70Sl1/qMPpJfEF
/6T+uDt7mB4D3+x0QAoVbQ9KSofDUZiujL0weOKtuL+3YkLy+fSSmdHA1pIIWnq+
Mjfpr4Qwtr/k5cWl39SuKm3RATLodJznCqyLiTTAkHPM8LNcvvch8jgWgoPVnmRb
ihZYjCgVDk0Nx0WjS7phUWqf7uwiALYTSMtHELcdAKT6zOQr8JfhVVoFU5EO6kin
OWShNVyd7AtkwgWE2d8cYzYMNuKYpKKlrifz3YBOMZf62B1NAPhgpwEko8AqYn2w
28WdMCf/J/iD/YdecjVIbtvXxyKFQjXcdRJrqVfgw4qqeSlrl6UjXJE1lF2hjBM=
=r5uY
-----END PGP SIGNATURE-----



More information about the nginx mailing list