Solution 1:

Alex was right sharing that post link because it leads to the main issue, but it needs a little bit of an explanation.

You will need to change 'keepalive_timeout' value (default is 65) in your Nginx configuration file ( /etc/nginx/nginx.conf) to increase the HTTP connection timeout, so your timeout is longer than the 600 seconds timeout in the Load Balancer. This causes the load balancer to be the side that closes idle connections, rather than nginx.

Tune nginx keepalives to work with the Google Cloud Platform HTTP(S) Load Balancer.
Set “keepalive_timeout 650;” in nginx /etc/nginx/nginx.conf

keepalive_timeout 650;
keepalive_requests 10000;

More in depth information about http persistence.