proxy_ignore_client_abort not working on linux

2016-11-30 Thread badtzhou
I can't get proxy_ignore_client_abort to work correctly on linux. The default option is off. But when I proxy a large cacheable file, nginx doesn't close the backend connection right away when client abort the request. The backend connection was not closed until the entire file has been buffered an

Occasionally 500 responses

2015-06-01 Thread badtzhou
We were seeing occasionally 500 responses from nginx on our production servers. There is nothing in the error log correlated to the event. Upon turning on debugging log and TCP dump, we identified the occasionally 500 responses are caused by end user resetting the connection(especially end users wh

Modify subrequest header

2015-01-21 Thread badtzhou
I am trying to use ngx_http_subrequest in my customize nginx module. I can see from the code that the subrequest share the same request header with the main request(sr->headers_in = r->headers_in). Is there a way to modify, add or delete request header for subrequest without affecting the request h

max_size on proxy_cache_path not working correctly

2014-12-16 Thread badtzhou
I am having problem with max_size setting on proxy_cache_path. I trying to set a limit on disk caching space that can be used by nginx. It works initially, but after a while the disk space used by nginx will grow much larger than max_size limit that I set. Feels like nginx cache manager die or stop

Range request not working for gzipped content

2014-08-22 Thread badtzhou
I found that whenever Content-Encoding: gzip is on. Nginx will return 200 instead of 206. When gzip is off, nginx will return range request normally. Is that the expected behavior for nginx? Thanks Don Posted at Nginx Forum: http://forum.nginx.org/read.php?2,252767,252767#msg-252767 __

Multiple nginx instances share same proxy cache storage

2014-08-04 Thread badtzhou
I am thinking about setting up multiple nginx instances share single proxy cache storage using NAS, NFS or some kind of distributed file system. Cache key will be the same for all nginx instances. Will this theory work? What kind of problem will it cause(locking, cached corruption or missing metada

resolver for upstream

2014-06-24 Thread badtzhou
We are trying to use resolver on upstream. It is not working for some reason. We are using nginx 1.6.0. Supposedly the feature should be available on 1.5.12. When we try to use it, It always give us an error. nginx: [emerg] invalid parameter "resolve" in... And when I checked the source code, it d

Re: 100% CPU nginx master process

2014-03-02 Thread badtzhou
We seeing lot of empty requests from nginx process trace. Is this normal or some kind of Dos attack? 0.48 recvfrom(254, "", 1024, 0, NULL, NULL) = 0 0.33 close(254)= 0 0.54 recvfrom(600, "", 1024, 0, NULL, NULL) = 0 0.29 close(600)= 0

100% CPU nginx master process

2014-03-02 Thread badtzhou
We are have issue that nginx master process is at 100% CPU and it stop responding to any request. The CPU utilization for all the workers are low. I am also seeing multiple nginx master process running at the same time when server stop responding, all of them are at 100% CPU. For my understand, th

force range request on proxy server

2013-07-30 Thread badtzhou
We used amazon S3 as upstream server. And it does not serve 'Accept-Ranges: bytes' as respond header. So the nginx proxy server will not serve range response even if the content has been completely cached on the proxy server. We tested on a upstream server that do serve 'Accept-Ranges: bytes' as re

Re: nginx cache loader process

2013-07-09 Thread badtzhou
We are running nginx 1.2.9. What will happen if cache loader is running. The file on disk haven't been loaded into the cache zone yet and someone try to access the same file. Will it cause any issue? How will it affect cache loader process. If I don't want any file on the disk to be loaded, can I

nginx cache loader process

2013-07-03 Thread badtzhou
We have several hundred Gs of file cached using nginx. Every time we restarted nginx, the cache loader process will appear and server load will go super high and respond very slowly. Looks like cache loader process is very I/O intensive and take a long time to finish. Is there anyway to get around