> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://avaruus-tuki-temp1.crisp.help/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# PHP - memory_limit

The PHP memory limit is a crucial setting that determines how much memory a PHP script can use during execution. This setting is vital for the stability and performance of PHP applications. It helps prevent scripts from consuming excessive system resources, which can lead to decreased performance or even server crashes. It's recommended to check the script's documentation to determine the required amount of memory.

If you encounter an error message like the one below on your website, it means the PHP memory limit has been exceeded, and you need to either optimize your script or increase the limit:

> **Fatal error**: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes)

The memory limit is defined in the php.ini configuration file. The default value is *8M* (8 megabytes). In the example above, the execution exceeded the 128-megabyte limit (134217728 bytes).

To increase the PHP memory limit:

1. Log in to your [Oma Avaruus](https://oma.avaruus.net) control panel using your credentials.
2. Select *Settings -> Pages* from the left menu.
3. Choose the website you want to modify and click *Edit*.
4. In the window that opens, click *PHP settings*.
5. Activate your own php.ini if it's not already active, and modify the memory_limit directive. Save the 
changes.

If you need more memory, contact customer support to add it as an additional service.
