Segfault - nginx 0.7.68

Nicholas Tang nicholas.tang at
Wed Dec 22 18:39:50 MSK 2010

So what I tried was separating it into two copies of nginx (both with the S3
patch): one that handles all of the local access, and that in the case where
the file doesn't exist locally and needs to get sent to S3, it proxies it to
the 2nd copy of nginx.  *That* copy has the S3 forwarding, and with this
setup, now it seems to work ok.

The next issue I have is that nginx seems to block and freeze on filesystem
access if there are problems - we had a problem w/ one network mount and
even w/ timeouts specified:

  sendfile on;
  tcp_nopush on;
  tcp_nodelay on;

  client_body_timeout 5;
  client_header_timeout 5;
  send_timeout 1;

  # keepalive_timeout 0;
  # keepalive_timeout 75 20;
  keepalive_timeout 5 5;

We still had nginx hang for a long time on an access to a filesystem that
was having issues.  (We're using glusterfs to mount remote volumes from our
storage servers.)  So we put in gluster timeouts, and that seems to time out
the gluster volumes, but nginx still remains locked up for an unacceptable
amount of time.

Is there a way to have nginx timeout the request (return a 503 or something,
for instance) if it doesn't get a response from the filesystem in x seconds?
 Ideally, we'd like it to time out after just a second or two.

What I'm looking at now is having Varnish in front of nginx and seeing if I
can get *that* timeout to work, but obviously this would be a lot cleaner
with fewer layers.  :)


*Nicholas Tang**:*
VP, Dev Ops

nicholas.tang at
t: +1 (646) 495 9707
m: +1 (347) 410 6066
111 8th Avenue, Floor 15, New York, NY 10011
[image:] <>

On Mon, Dec 20, 2010 at 1:02 PM, Piotr Sikora <piotr.sikora at>wrote:

> Hi,
>  We're running nginx 0.7.68 w/ the s3-proxy patch applied, and we're seeing
>> reproducible segfaults when we hit (or miss) certain files:
> Can you reproduce them without s3-proxy patch?
> Best regards,
> Piotr Sikora < piotr.sikora at >
> _______________________________________________
> nginx mailing list
> nginx at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list