Jupyter notebook won't finish execution (* symbol next to the cell no longer appears)

I am running some python 3 code using a jupyter notebook. The notebook should take a couple of days to finish all computations. It, however, fails to finish execution. After a couple of running hours the * symbol next to the cell no longer appears. Sometimes there is no error massage and sometimes it gives “Error rendering Jupyter widget.” I have deleted miniconda and reinstalled it but the issue remains. Any idea how to solve this?

How are you monitoring your memory usage?

If you are using JupyterLab, there is a nice monitor that is part of the status bar along the bottom. See Mem: along the bottom of this gif to get an idea of where to look.

If you are using the classic notebook interface maybe try %memit magic, see here? Or nbresuse? Or try some profiling?