[IPython-User] Connection timeouts, reconnecting, status
Wed Jun 20 03:46:34 CDT 2012
On Wed, Jun 20, 2012 at 1:31 AM, Thomas Pfaff <firstname.lastname@example.org>wrote:
> Hi everyone,
> I'm using Ipython 0.12, python 2.6.6, 32-bit on a Windows7 x64 system.
> I *love* the notebook. It has revolutionized the way I work with
> python and on my data.
> For the first time, it feels really natural to explore data
> interactively, have the plots inline, and do the documentation
> Thank you for this awesome piece of software!
> But now enough of the praise, back to business.
> There are a few things that kind of bother me, still and I wonder if
> I'm alone with those.
> These are:
> 1. My notebooks are timing out too fast and too often.
> If there is the slightest load on my PC, I usually get the message
> that the Kernel has died even when opening a notebook for the first
> time. Needless to say that these local kernels are enjoying perfect
> health and can be connected to by qtconsoles without any problems.
> Also, often I get timeouts when returning from suspend, which is
> especially annoying because that is what suspend is for. Getting back
> to your work without having to re-run everything.
> Is there a way to increase the timeout for the notebook as a first
This was a bug discovered and fixed almost immediately after the 0.12
release. It is pretty much the only reason there was an 0.12.1 release.
> 2. I could live with the timeout message if there were an easy way to
> reconnect to a kernel without having to restart it.
> Closing the notebook and reopening from the dashboard doesn't seem the
> right option, because sometimes I try something, which I don't want to
> save, but like to keep for the current session.
> Is there another way? Or could I persuade you to introduce a
> 'reconnect' button in the next release?
The timeout message is the notebook believing that the kernel is *dead*,
due to a bug in 0.12. There is no reconnect necessary - even on kernel
restart, there is no reconnection because the zeromq connections remain
valid across endpoint restart. This should not be relevant in 0.13.
> 3. You can't tell a notebook with a dead kernel from a live one.
> Right now, the only way to tell is that the notebook doesn't change to
> 'Busy' when submitting a code cell on a dead notebook. It's not a big
> deal, but people also put an 'out-of-order' sign to an elevator and
> don't expect the people to find out for themselves.
> Couldn't you just use the status display and extend it by 'Connected'
> and 'Disconnected' for the times it's not 'Busy' or 'Restarting'?
Yes you can, this is precisely what the heartbeat does. If the kernel goes
down, you will get a 'kernel has died' message, prompting for restart. The
kernel can be busy holding the gil and 100% CPU for days, and the notebook
will know that it is still alive, chugging along. 0.12 had a GIL-related
bug that could cause false-positive in the heartbeat mechanism (see above)
> 4. Is there a way to create a copy of a notebook?
> Right now I'm doing it by copying the .ipynb file and changing the
> notebook title using a text editor. That's fine, but prone to errors.
> It would be nice to have a copy function of some sorts, because,
> again, sometimes you'd like to make changes to an existing notebook,
> or re-use code from one without modifying the original.
In 0.13, there is a button for this. In 0.12, you have to do `cp foo.ipynb
bar.ipynb` at the command-line.
> That would be my kind of wishlist (they do sound a bit trivial, now
> that I read them a second time, so maybe they could be implemented
If they are not trivial, how difficult do you think they would be to
> implement. Maybe I'd use some spare time after I finished my thesis,
> to try and increase ipython's awesomeness on these issues by myself.
> Or maybe just tell me that all this has already been solved in 0.13.
> Christmas would have got serious competition.
Indeed, I believe every one of your points is addressed by 0.13. Can you
check out the beta <http://archive.ipython.org/testing/0.13.beta1/>?
> IPython-User mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-User