

Or like this: PHP Fatal error: Out of memory (allocated x) (tried to allocate x bytes) in /path/to/php/script When blocked, the resulting error output looks something like this: Fatal error: Allowed memory size of x bytes exhausted (tried to allocate x bytes) in /path/to/php/script PHP memory_limit is the maximum amount of server memory a single PHP script is allowed to consume. Unlike say, MySQL’s key_buffer_size or innodb_buffer_pool settings, PHP memory_limit setting is not a storage space where multiple PHP scripts pool from or grow within.

This helps prevent poorly written scripts for eating up all available memory on a server. In other cases I would recommend doing so.PHP.net’s documentations puts it this way: This sets the maximum amount of memory in bytes that a script is allowed to allocate. In this case, the only work around might be restarting the Jupyter process. Even if they are less likely to happen in Python, there are some bug reports for Jupyter.

These type of bugs are called memory leak and often occur in server processes running for a long time. In this case you actually might have to shutdown the notebook manually or use some other method to delete the (global) variables.Ī completely different reason for the same kind of problem might be a bug in Jupyter. If you are storing large files in (different) variables over weeks, the data will stay in memory and eventually fill it up. by using del, if the variable is overwritten with something else or if it goes out of scope (a local variable at the end of a function). Python's garbage collector will free the memory again (in most cases) if it detects that the data is not needed anylonger. If you load a file in a Jupyter notebook and store its content in a variable, the underlying Python process will keep the memory for this data allocated as long as the variable exists and the notebook is running.
