Allowed memory size of (…) exhausted

Turns out this issue was caused by bad code (a missing assert) in my theme. More specifically the theme requires a custom navigation menu. As this menu hadn’t been created and assigned the site crashed. Why this caused an memory exhaustion error on my production server and not my development computer I unfortunately don’t know.