I have a server which needs to know when the client closes the connection. The server is behind an nginx reverse proxy. Everything works fine over HTTP, but as soon as I turn SSL on, nginx seems to hold the upstream connection open for a full minute after the HTTPS client has disconnected.

How can I get nginx to close the upstream connection when the client disconnects?

Here's my nginx config:

ssl_session_cache off;
server {
    listen 443;
    ssl on;
    ssl_certificate server.crt;
    ssl_certificate_key server.key;
    location /find {
      proxy_pass http://my_upstream;
      proxy_ignore_client_abort off;
      proxy_buffering off;
    }
  }
link|improve this question
Try proxy_ignore_client_abort on. Prevents aborting request to proxy in case the client itself aborts the request – ooshro Feb 25 '11 at 0:38
that is exactly the behaviour I don't want. I want the proxy to abort the upstream connection as soon as the client closes the connection. – nornagon Feb 25 '11 at 1:30
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.