nginx close upstream connection after request

Solution 1:

The documentation states that for http keepalive, you should also set proxy_http_version 1.1; and proxy_set_header Connection "";