Problem
The CBS server uses nfs4 for the home directory, which has known issues with sqlite, which causes some issues when Jupyter notebooks (and iPython) on the CBS server.
E.g. you will see these errors pop up in your console related to Jupyter & iPython failing to create temporary db files in your home directory, which may also result in momentary freezes:
[W 2022-04-29 11:23:39.565 ServerApp] The signatures database cannot be opened; maybe it is corrupted or encrypted. You may need to rerun your notebooks to ensure that they are trusted to run Javascript. The old signatures database has been renamed to /home/ROBARTS/alik/.local/share/jupyter/nbsignatures.db.bak and a new one has been created.
[W 2022-04-29 11:23:39.584 ServerApp] Failed commiting signatures database to disk. You may need to move the database file to a non-networked file system, using config option `NotebookNotary.db_file`. Using in-memory signatures database for the remainder of this session.
and
[IPKernelApp] ERROR | Failed to open SQLite history /home/ROBARTS/alik/.ipython/profile_default/history.sqlite (disk I/O error).
[IPKernelApp] ERROR | History file was moved to /home/ROBARTS/alik/.ipython/profile_default/history-corrupt.sqlite and a new file created.
Solution
Fortunately this problem can be solved by making a change to your config files:
Edit or create the following files with the following content:
~/.ipython/profile_default/ipython_config.py
:
c = get_config() #gets the configuration
c.HistoryManager.hist_file='/tmp/ipython_hist.sqlite' #changes history file writing to tmp folder
For Jupyter Notebook/Lab users, edit the ~/.jupyter/jupyter_notebook_config.py
or ~/.jupyter/jupyter_lab_config.py
to include:
c.NotebookNotary.data_dir = "/tmp"
This instructs iPython and Jupyter to use /tmp
for these files instead.