List Kernel JSON Response Explanation

Hi, I have an Enterprise Gateway setup for running kernels and was wondering about the specifics of the JSON response body for the GET api/kernels endpoint. Most of the fields are self explanatory, but I want to know what the connections field is reporting. For example I have attached a redacted version of my own Gateway’s response from that call.

[
	{
		"id": "69c86a03-4166-4961-b6ef-044b71a0a468",
		"name": "test-kernel-name",
		"last_activity": "2023-02-15T16:44:44.537596Z",
		"execution_state": "idle",
		"connections": 4039
	},
	{
		"id": "fdde574e-3c7b-40a3-bc39-e76a7f5ddc82",
		"name": "test-kernel-name",
		"last_activity": "2023-02-15T14:38:57.269689Z",
		"execution_state": "idle",
		"connections": 5469
	},
	{
		"id": "8335c579-6daf-4c35-a96d-2ce77b04bbca",
		"name": "test-kernel-name",
		"last_activity": "2023-02-16T16:17:44.483224Z",
		"execution_state": "idle",
		"connections": 5018
	},
	{
		"id": "65ee49d6-4051-41aa-a4fb-382a28401baa",
		"name": "test-kernel-name",
		"last_activity": "2023-02-16T16:17:55.101247Z",
		"execution_state": "idle",
		"connections": 5058
	},
	{
		"id": "6a968222-f9da-400c-88c4-a7d9dd1a2ceb",
		"name": "test-kernel-name",
		"last_activity": "2023-02-16T16:52:08.671040Z",
		"execution_state": "busy",
		"connections": 257
	},
	{
		"id": "f05d65d3-6c45-49a5-85f0-c46b6fef5d31",
		"name": "test-kernel-name",
		"last_activity": "2023-02-16T16:23:25.586443Z",
		"execution_state": "starting",
		"connections": 1884
	}
]

I ran into an issue zmq.error.ZMQError: Too many open files which I’m guessing has some relation to the connections above but I was having a hard time finding a description of this key.

Here’s the openapi spec:

This can be loaded into some downstream tooling, as well:
https://editor.swagger.io/

use the File → Load from URL with the raw url:

1 Like

thanks! @kevin-bates Do you think it makes sense for me to add the models (such as kernel) to the EG docs page?

To which “EG docs page” are you referring? We already provide the OpenAPI information, as well as an “interactive” mode where the model can be displayed.

2 Likes

Oh I see. I was thinking the bottom of the Rest API page, similar to how it is in the interactive mode. Directly embedding it on there rather than within the interactive model. I suppose it would be hard to manage model changes in that situation though.

Hi @bloomsa - Given these (models) are some of the more stable artifacts we have, I’m game for any UX improvements we can make in our docs. If you’re still interested, please open a PR in EG and we can take a look. Thank you!

1 Like