I set up a server on Google Compute Engine with Apache server on Ubuntu 16.04.4 LTS. It's protected with IAP.
It was fine all along for about 6 months but now some of the users encounter 502 Server Error.
I already checked the following links
- Some 502 errors in GCP HTTP Load Balancing [Changed the Apache KeepAliveTimeout to 620]
 - 502 response coming from errors in Google Cloud LoadBalancer [Removed ajax requests]
 
But the problem is still there.
Here is the error message from one of the log.
{
     httpRequest: {…}  
     insertId:  "170sg34g5fmld90"  
     jsonPayload: {
      @type:  "type.googleapis.com/google.cloud.loadbalancing.type.LoadBalancerLogEntry"   
      statusDetails:  "failed_to_pick_backend"   
     }
     logName:  "projects/sggc-web01/logs/requests"  
     receiveTimestamp:  "2018-03-14T07:21:55.807802906Z"  
     resource: {…}  
     severity:  "WARNING"  
     spanId:  "44a49bf1b3893412"  
     timestamp:  "2018-03-14T07:21:53.048717425Z"  
     trace:  "projects/sggc-web01/traces/f35119d8571f20df670b0d53ab6b3210"  
    }
Please help me to trace and fix the issue. Thank you!