Maxim, thank you for reply!
Some additional question here:
1. If we will remove 'timeout' will Nginx send traffic to the next upstream on 502 error?
2. More general question related the the Q.1. When Nginx interpret reply as 502 - on timeout, if yes - on which one? We have a lot of timeouts defined in the main config:
----
client_header_timeout 30s;
client_body_timeout 30s;
send_timeout 65s;
proxy_connect_timeout 5s;
proxy_send_timeout 65s;
proxy_read_timeout 65s;
----
Thanks!