Forums

getting "Failed to start kernel" error on IPython notebook

I initially got this error 4-5 hours ago. Hoping it was something temporary I stopped using the website, but four hours later it's still there.

This is the log:

Traceback (most recent call last): File "/usr/local/lib/python3.4/dist-packages/IPython/html/base/handlers.py", line 441, in wrapper result = yield gen.maybe_future(method(self, args, kwargs)) File "/usr/local/lib/python3.4/dist-packages/IPython/html/services/sessions/handlers.py", line 53, in post model = sm.create_session(path=path, kernel_name=kernel_name) File "/usr/local/lib/python3.4/dist-packages/IPython/html/services/sessions/sessionmanager.py", line 66, in create_session kernel_name=kernel_name) File "/usr/local/lib/python3.4/dist-packages/IPython/html/services/kernels/kernelmanager.py", line 84, in start_kernel kernel_name=kernel_name, kwargs) File "/usr/local/lib/python3.4/dist-packages/IPython/kernel/multikernelmanager.py", line 112, in start_kernel km.start_kernel(kwargs) File "/usr/local/lib/python3.4/dist-packages/IPython/kernel/manager.py", line 240, in start_kernel kw) File "/usr/local/lib/python3.4/dist-packages/IPython/kernel/manager.py", line 189, in _launch_kernel return launch_kernel(kernel_cmd, kw) File "/usr/local/lib/python3.4/dist-packages/IPython/kernel/launcher.py", line 213, in launch_kernel proc = Popen(cmd, *kwargs) File "/usr/lib/python3.4/subprocess.py", line 859, in init restore_signals, start_new_session) File "/usr/lib/python3.4/subprocess.py", line 1395, in _execute_child restore_signals, start_new_session, preexec_fn) BlockingIOError: [Errno 11] Resource temporarily unavailable

I

"Resource Temporarily Unavailable" sometimes means you've maxed out the number of processes you can start on a given server. We set the limit at 128 I think, which should be enough for almost anything, but maybe you were doing some multiprocessing stuff that got out of hand?

Try opening your process listing (from the button on the consoles page) and killing a few processes?

Thanks.. It wasn't anything I was doing on purpose, but I guess it's one of the libraries I was using. Maybe I was supposed to do something to terminate the process; I'll have to investigate.

There are a bunch of processes that look similar to the following:

/usr/local/bin/python3.4 -m IPython.kernel -f /home/mindgames/.ipython/profile_default/security/kernel-1aae35da-5e28-4394-b219-abe7301fdaef.json

Is there a way to kill the processes from Bash? Because from the web interface it seems I have to kill them one by one, which is a bit bothersome. I'm not a Linux expert, but I'm aware of ps and top, but it seems you need root permissions for those.

Hi there, there's no way to kill things from Bash, no -- processes could be running on different servers from the one any particular console is on, you see.

We should make the UI for that process listing dashboard better though. Maybe a "kill all my processes" button (take off and nuke the site from orbit!)