title: Airflow web-server produces temporary 502 errors in Cloud Composer
body: <p>I'm encountering 502 errors on AirFlow(2.0.2) UI hosted in Cloud Composer(1.17.0).</p>
  <pre><code>Error: Server Error The server encountered a temporary error and could not complete your request.
  Please try again in 30 seconds.
  </code></pre>
  <p>They last for a few minutes and it happens several times a day after it's gone everything works fine.</p>
  <p>At the moment of errors:</p>
  <ul>
  <li>there is a gap in logs and after we can see that logs resumed with messages about staring gunicorn:<br />
  <code>[1133] [INFO] Starting gunicorn 19.10.0</code></li>
  <li>there is a spike in resource usage of web-server</li>
  <li>I didn't spot any other suspicious activity in other parts of the system(workers, scheduler, DB)</li>
  </ul>
  <p>I think that this is a result of <strong>OOM</strong> error because we have DAGs with a big number of tasks (2k).<br />
  But I'd like to be sure and I haven't found <strong>a way to connect to VM of app engine in tenant project</strong>(where Airflow server is hosted by default) to get additional logs.</p>
  <p><strong>Maybe anyone knows a way to get additional logs from AirFlow server VMs or have any other idea?</strong></p>