WebSocket connection failed: Error during Websocket handshake: Unexpected response code: 504


I am running Jupyter Lab on a container on an AWS instance. Once in a while I am getting this error, and the container gets a SIG15 and shuts down

Has anyone seen this issue and can help understand what the problem is and / or how to fix it ?