jupyter / nb2kg

Other
73 stars 31 forks source link

Increase http timeout default values #35

Closed kevin-bates closed 5 years ago

kevin-bates commented 5 years ago

The current defaults are 20 seconds which matches the defaults imposed by tornado. Since it doesn't hurt to increase these and since many kernel starts take just around 20-30 seconds in Yarn clusters, etc., it is better to have these values be longer - so this PR increases them to 60 seconds. This also allows server-side kernel startup issues to occur that might have otherwise happened after the previous default or the kernel startup succeed only to have the request timeout.

meeseeksmachine commented 5 years ago

This pull request has been mentioned on Jupyter Community Forum. There might be relevant details there:

https://discourse.jupyter.org/t/notebook-failed-to-connect-with-enterprice-gateway-kernel-using-websocket-exception-in-kernelgatewaywsclient-connection-done/1025/2

ArindamHalder7 commented 5 years ago

@kevin-bates This on the context of the above issue [https://discourse.jupyter.org/t/notebook-failed-to-connect-with-enterprice-gateway-kernel-using-websocket-exception-in-kernelgatewaywsclient-connection-done/1025/2] I am not able post message in the jupyter community. So providing you EG log here. Also i will try with increasing the KG_REQUEST_TIMEOUT. Here is the log.

cto@cto:~/jupyter_enterprise_gateway$ jupyter enterprisegateway --ip=0.0.0.0 --port_retries=0 [I 2019-05-09 12:21:06.172 EnterpriseGatewayApp] Jupyter Enterprise Gateway 1.2.0 is available at http://0.0.0.0:8888 [W 190509 12:21:22 web:1782] 404 DELETE /api/kernels/9fd2feb9-f9df-48a9-a775-f6c82044c1a6 (10.100.11.9): Kernel does not exist: 9fd2feb9-f9df-48a9-a775-f6c82044c1a6 [W 190509 12:21:22 web:2246] 404 DELETE /api/kernels/9fd2feb9-f9df-48a9-a775-f6c82044c1a6 (10.100.11.9) 1.88ms [I 190509 12:25:53 web:2246] 200 GET /api/kernelspecs (10.100.11.9) 860.85ms [I 190509 12:26:23 web:2246] 200 GET /api/kernelspecs (10.100.11.9) 3.40ms [I 2019-05-09 12:26:25.054 EnterpriseGatewayApp] Local kernel launched on '10.100.10.55', pid: 31136, pgid: 31136, KernelID: b59bcef8-774f-4e4b-a93d-01420d089b02, cmd: '['/usr/local/share/jupyter/kernels/spark_python_yarn_client/bin/run.sh', '--RemoteProcessProxy.kernel-id', '{kernel_id}', '--RemoteProcessProxy.response-address', '{response_address}', '--RemoteProcessProxy.port-range', '0..0', '--RemoteProcessProxy.spark-context-initialization-mode', 'lazy']'

Starting IPython kernel for Spark in Yarn Client mode on behalf of user cto

kevin-bates commented 5 years ago

Moved this latest question to a new issue in Enterprise Gateway (https://github.com/jupyter/enterprise_gateway/issues/660) where we can work on thins there.