Kirby 3.8.2/3.9 site crashes on both production and local servers. Error: 5

A Kirby 3.8/3.9 site is crashing on both production and local servers. Live site is currently down. See screenshots below:

It has been running fine for a few months since its launch.

The error code is: 5

The website starts to load, but does not complete, then it crashes.

I’ve run server tests and it’s not the server.

Any ideas what’s causing this? It’s not showing up/redirecting to debug either :confused:

I’m getting Error code: Out of Memory. Something might be stuck in an infinite loop.

1 Like

It turned out to be a foreach loop trying to pull data from an empty structure (which was deleted by a user). This caused the site the crash.

I managed to resolve this by wrapping the foreach loop with an if statement. This way if there is no data, the element is left out.

Great! Website is working great now :tada:

1 Like

Thanks for the tip !