Francis,
Basically, the issue was with the 'proxy_set_header' directives. In such cases, when we define at least one in the location, we should also define all the rests headers.
From your reply, I understand that with the 'proxy_read_timeout/proxy_send_timeout' we should not have such situations.
Thank you for your reply and explanation!