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.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)