Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How does Notebook worksheet timeout work?

I cannot understand how the Sage Notebook server actually treats the timeout parameter. The documentation just says that it is the "...seconds until idle worksheet sessions automatically timeout." However, it is not completely clear when the worksheet is considered idle.

From this answer by William Stein it follows that the worksheet is considered idle if the user closes the corresponding tab in the browser.

I performed several tests today and here is what I got:

  1. I started my local Notebook server with timeout=10 and opened a couple of worksheets in my browser. After that I closed some of them keeping the others open, and just waited for the corresponding message in the console. After about 10 minutes I saw a bunch of messages in the console saying that Sage had just closed all of my opened worksheets. So, Sage server closed all the worksheets regardless of whether they were opened in the browser or not.

  2. During the second test I opened two worksheets and started to refresh only one of them (by pressing F5). After ~10min Sage closed both of them at the same time. So, obviously, refreshing the page does not help.

  3. The third test was to start computing something and see what happens. So I started some "never-ending" computation in the worksheet and kept the page open in the browser. It showed the rotating stick (/ \ / \ ...) for ~10 minutes and than terminated the process again, despite the fact that I kept the browser tab open all the time.

So it looks like the only thing that resets the timer is starting some cell to calculate something (Shift+Enter).


My question is: are all my tests and conclusions correct? And if they are, is it really the intended behaviour for Notebook server?

How does Notebook worksheet timeout work?

I cannot understand how the Sage Notebook server actually treats the timeout parameter. The documentation just says that it is the "...seconds until idle worksheet sessions automatically timeout." However, it is not completely clear when the worksheet is considered idle.

From this answer by William Stein it follows that the worksheet is considered idle if the user closes the corresponding tab in the browser.

I performed several tests today and here is what I got:

  1. I started my local Notebook server with timeout=10 and opened a couple of worksheets in my browser. After that I closed some of them keeping the others open, and just waited for the corresponding message in the console. After about 10 minutes I saw a bunch of messages in the console saying that Sage had just closed all of my opened worksheets. So, Sage server closed all the worksheets regardless of whether they were opened in the browser or not.

  2. During the second test I opened two worksheets and started to refresh only one of them (by pressing F5). After ~10min Sage closed both of them at the same time. So, obviously, refreshing the page does not help.

  3. The third test was to start computing something and see what happens. So I started some "never-ending" computation in the worksheet and kept the page open in the browser. It showed the rotating stick (/ \ / \ ...) for ~10 minutes and than terminated the process again, despite the fact that I kept the browser tab open all the time.

So it looks like the only thing that resets the timer is starting some cell to calculate something (Shift+Enter).

And just a side note: I noticed that the minimum actual timeout is 10 minutes.


My question is: are all my tests and conclusions correct? And if they are, is it really the intended behaviour for Notebook server?