Jupyter Server Memory Issues
Some common errors or symptoms you may see due to memory issues:
- "Unexpected error while saving file"
- "Error loading notebook
Unreadable notebook:
<path to notebook" MemoryError()" - "An unknown error occurred while loading this notebook. This version can load notebook formats or earlier. See the server log for details."
- Slow or unresponsive notebooks
Restoring your server memory:
- If you are not able to save your work, leave that notebook open. Otherwise, close the notebook and any other Jupyter tabs you have open.
- Use the Quit button on the Jupyter directory page and re-spawn your server.
- If you left a notebook open, go to that tab and save your work.
Diagnosing the Problem
- Are you using good server "hygeine"? See below on things that help prevent memory errors.
- Some courses have assignments that need more memory. Make sure you are using the correct container for your course.
- You may have a coding problem. Common examples are infinite loops or cross-products in queries. Your instructor or TA can help diagnose these issues.
Good Server Hygeine: Some things that help prevent memory errors:
- Make sure to save, then go to File > Close and halt to close your notebooks when you are done with them. Also enter
exitbefore closing a terminal tab. - Minimize the number of tabs that are open.
- Avoid lots of output. Too much output by itself can crash your server and make it impossible to open a notebook when you re-spawn. Print just a few lines if needed for debugging.
- Avoid making multiple copies of your data in memory, especially if it is large. Students will often create df1, df2, df3, etc. as they make changes to the dataframe. Re-use the same variable or delete unneeded copies of the data from memory.
- Do not leave your container running when not using it, especially for long periods of time.
- For assignments or problems that are truly memory intensive, you may need to use chunking or other big-data strategies.
- If this problem persists or is common to students in your course, raise the issue with your instructor. The sysadmin adjusts container resources in conjunction with the instructor and considering system-wide needs.
Need more information or help? Reach out to us at 📧 jcwdw@missouri.edu