Ask Your Question
0

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

asked 14 years ago

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?

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
2

answered 14 years ago

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 http://sagenb.org, it does happen since otherwise there will eventually be too many tty's and files allocated, and the server will grind to a halt.

Preview: (hide)
link

Comments

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

ccanonc gravatar imageccanonc ( 14 years ago )

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: http://trac.sagemath.org/sage_trac/ticket/9805

William Stein gravatar imageWilliam Stein ( 14 years ago )

Thx!!!!!!!

ccanonc gravatar imageccanonc ( 14 years ago )

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 ( 10 years ago )

Your Answer

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

Add Answer

Question Tools

2 followers

Stats

Asked: 14 years ago

Seen: 1,098 times

Last updated: Aug 26 '10