title: JupyterHub kernel connection returns HTTP504 GATEWAY_TIMEOUT
body: <p>I am deploying <a href="https://i.stack.imgur.com/0jCMZ.png" rel="nofollow noreferrer">JupyterHub</a> 0.8.2 to kubernetes (EKS on AWS, v1.13).</p>
  
  <p>When I deploy the JupyterHub application to EKS via helm, everything deploys and starts fine. However, when I spawn a notebook server and create a python notebook, the kernel hangs when trying to connect. (See screenshots at the bottom)</p>
  
  <p>I saw a similar issue posted here: <a href="https://github.com/jupyter/notebook/issues/2664" rel="nofollow noreferrer">https://github.com/jupyter/notebook/issues/2664</a>, it seems there was a regression in tornado python package. However, I tried downgrading to 5.1.1 and that did not fix the issue...</p>
  
  <p>What are the next troubleshooting steps I can try? Where can I find diagnostic info / logs for python kernel?</p>
  
  <p><a href="https://i.stack.imgur.com/Ul0i6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ul0i6.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/0jCMZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0jCMZ.png" alt="enter image description here"></a></p>
  
  <p><strong>Update:</strong> one of our existing clusters that was running fine for about 2 months, started experiencing this kernel issue just today. This makes me wonder if this is some sort of regression, however how would this affect a jupyterhub deployment that has not been modified? Does jupyterhub update libraries/packages by itself, without consent?</p>
  
  <p><strong>Update 2:</strong> I inspected network traffic in browser, and discovered that the request to <code>https://&lt;&lt;JUPYTERHUB_DOMAIN&gt;&gt;/user/me/api/kernels/&lt;&lt;KERNEL_ID&gt;&gt;/channels?session_id=&lt;&lt;SESSION_ID&gt;&gt;</code> is returning <code>HTTP 504 GATEWAY_TIMEOUT</code></p>
  
  <p>Detailed HTTP request:</p>
  
  <pre><code>GET wss://&lt;&lt;MY_JHUB_DOMAIN&gt;&gt;/user/me/api/kernels/eaf397d3-36da-473c-8342-c4d4d3ad5256/channels?session_id=fa79dc80238648b8b1ea4c3982cb0612 HTTP/1.1
  Host: &lt;&lt;MY_JHUB_DOMAIN&gt;&gt;
  Connection: Upgrade
  Pragma: no-cache
  Cache-Control: no-cache
  Upgrade: websocket
  Origin: https://&lt;&lt;MY_JHUB_DOMAIN&gt;&gt;
  Sec-WebSocket-Version: 13
  User-Agent: redacted
  Accept-Encoding: gzip, deflate, br
  Accept-Language: en-US,en;q=0.9
  Cookie: redacted
  Sec-WebSocket-Key:redacted
  Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits
  </code></pre>
  
  <p>Detailed HTTP response:</p>
  
  <pre><code>HTTP/1.1 504 GATEWAY_TIMEOUT
  Content-Length: 0
  Connection: keep-alive
  
  data:undefined,
  </code></pre>