Implement automatic monitoring of the iPython Notebook Server

0 Kudos

Every few months we get an issue with the iPython Notebook Server that stops responding. Dataiku already provides process monitoring for the ipython process via supervisord. However this doesn't cover the case when the iPython process stops responding. This idea is to have Dataiku perform checks on the ipython server process to make sure it's responsive and if it is not then restart the ipython process. 

1 Comment
Clément_Stenac
Dataiker

Hi,

You can regularly call the https://developer.dataiku.com/latest/api-reference/python/client.html#dataikuapi.DSSClient.list_runn... method.

In your specific issue case, it would not respond, so you need to add a timeout and react on exception:

import dataiku
client = dataiku.api_client()

import functools
client._session.request = functools.partial(client._session.request, timeout=10)

client.list_running_notebooks()

Hi,

You can regularly call the https://developer.dataiku.com/latest/api-reference/python/client.html#dataikuapi.DSSClient.list_runn... method.

In your specific issue case, it would not respond, so you need to add a timeout and react on exception:

import dataiku
client = dataiku.api_client()

import functools
client._session.request = functools.partial(client._session.request, timeout=10)

client.list_running_notebooks()