Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jupyter server running after shutdown #59

Open
Dianeod opened this issue Sep 4, 2020 · 0 comments
Open

Jupyter server running after shutdown #59

Dianeod opened this issue Sep 4, 2020 · 0 comments

Comments

@Dianeod
Copy link
Contributor

Dianeod commented Sep 4, 2020

An issue has been raised where jupyterq_server.q is still running after the jupyter kernel has been properly shut down.

The following fixes were attempted:

  1. Adding a timer function to jupyterq_server.q to check if the handle to the kernel was closed and exit the process if so
.z.ts:{if[0~count .z.W;exit 0]};system"t 5000"; 

but the above did not work and the server was still present

  1. Adding code to jupyterq_kernel.q, to kill the the server once the kernel is closed
ch.sh.shutdown_request:{[z;s;mc]if[last allowstop;snd[z;s]kr[`shutdown_reply;mc]md[`restart]mc .`content`restart;system"kill ",string neg[srvh]".z.i";exit 0]}

The above addition worked, however hasn’t been fully tested to ensure that it doesn’t cause any side effects that may impact the average user so is not currently being added as a fix

Below is the versions within the environment

kdb 4.0
jupyterq 1.1.7
python 3.6
anaconda-client (1.6.9)
ipykernel (4.8.0)
ipython (6.2.1)
ipython-genutils (0.2.0)
jupyter-client (5.2.2)
jupyter-contrib-core (0.3.3)
jupyter-core (4.4.0)
notebook (5.4.0)
prompt-toolkit (1.0.15)
qtconsole (4.3.1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant