Ask Your Question

What state is preserved when I close a running notebook browser window?

asked 2010-08-25 19:20:35 +0200

ccanonc gravatar image

What state is preserved when I close a running notebook browser window?

When I navigate back to the main dashboard/login page, or refresh it from another tab, the notebook is still marked as "(running)". So, when I return to the notebook by opening it in another new tab or window, what state has been preserved, and what state has been lost?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2010-08-26 00:01:23 +0200

William Stein gravatar image

Simple answer: By default, all state is preserved.

Complicated answer: There is an optional timeout parameter that you can pass to the notebook command when you start the notebook server. If you set it to 360, then start worksheet "running", and close your web browser, then after 6 minutes the corresponding Sage worksheet process will step running. Internally what happens is that the web browser sends a ping every so often, and if it doesn't see one after timeout seconds it kills the worksheet. This does not happen by default. However, on a public server like, it does happen since otherwise there will eventually be too many tty's and files allocated, and the server will grind to a halt.

edit flag offensive delete link more


On my dream-wishlist would be the ability to auto-pause the state and serialize it. =)

ccanonc gravatar imageccanonc ( 2010-08-26 00:04:15 +0200 )edit

Check out the save_session command. This will save all the save-able variables in a session to a file. Unfortunately, I just tried it and it is completely broken in the notebook (though it works fine on the command line). I've reported this bug:

William Stein gravatar imageWilliam Stein ( 2010-08-26 00:10:16 +0200 )edit


ccanonc gravatar imageccanonc ( 2010-08-26 00:27:13 +0200 )edit

Is the timeout value reset if I close the browser, and than open it again and relogin to the Notebook before the timeout value? For example, if the timeout is five days, and I open the worksheet every morning and close the browser every evening.

v_2e gravatar imagev_2e ( 2014-07-08 19:24:53 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2010-08-25 19:20:35 +0200

Seen: 986 times

Last updated: Aug 26 '10