HTTP ERROR 500 ( Allowed memory size xxx bytes exhausted )

Hello,
Please I need help with the 500 error.
Memory limit set to 512M
Error logs:
[06-Oct-2018 22:55:56 UTC] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 1208156960 bytes) in /home/etienne4/public_html/matstats/libs/Zend/Db/Statement/Mysqli.php on line 235
No access to the site either the admin dashboard (same error).
Any advice, thanks.

Enable auto archiving of your reports (How to Set up Auto-Archiving of Your Reports - Analytics Platform - Matomo) and disable browser triggered archiving. (also in the linked docs)