ErrorException (E_ERROR)

Hi,

I run grav with xampp on windows, it works well this morning. but it shows error now when login in admin panel.

**Whoops\Exception\ErrorException **
…\system\src\Grav\Common\Iterator.php213
Allowed memory size of 134217728 bytes exhausted (tried to allocate 4096 bytes)

Sometimes, it shows the error below:

> Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 4096 bytes) in F:\xampp\htdocs\system\src\Grav\Common\Iterator.php on line 213
**> **
> Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 16384 bytes) in F:\xampp\htdocs\vendor\filp\whoops\src\Whoops\Util\SystemFacade.php on line 18

I’m not a Windows SysAdmin, but in general on Linux, the error Allowed Memory Size exhausted is an issue with the php.ini configuration and I would presume that it is the same issue here.

Your server is saying that it has exceeded the 128M (134217728 bytes) php memory_limit variable by 4KB or 16KB (4096/16384 bytes).

You should consider either increasing your php memory_limit to the minimal amount needed to process the page (which is apparently slightly larger than 128M) or you will need to reduce the size of the page being loaded (removing heavy plugins, large-sized content, and the like). Increasing your php memory_limit may not be advisable depending on the available resources of your server as it could cause it to run oom (out of memory). You will want to ask your system administrator what would be best. Increasing the memory_limit to 129M should not be an issue.

You would need to edit the appropriate php.ini file. This can be obtained from a phpinfo script (or from the CLI in Linux). You will want the Loaded variable (Linux CLI:php -i | grep -i loaded). A Ctrl+F/Fin on the phpinfo page in your browser for ‘loaded’ should yield the server’s php.ini file. (The CLI may report the CLI’s php.ini, which can be a different file.)

Note that I am approaching this from a Linux SysAdmin’s perspective.