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:

  1. 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.
  2. Use the Quit button on the Jupyter directory page and re-spawn your server.
  3. If you left a notebook open, go to that tab and save your work.

Diagnosing the Problem

  1. Are you using good server "hygeine"? See below on things that help prevent memory errors.
  2. Some courses have assignments that need more memory. Make sure you are using the correct container for your course.
  3. 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:

  1. Make sure to save, then go to File > Close and halt to close your notebooks when you are done with them. Also enter exit before closing a terminal tab.
  2. Minimize the number of tabs that are open.
  3. 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.
  4. 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.
  5. Do not leave your container running when not using it, especially for long periods of time.
  6. For assignments or problems that are truly memory intensive, you may need to use chunking or other big-data strategies.
  7. 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