I’m running a large WordPress multisite install that, for each site, runs a number of database queries to display information in the respective blog. The data queries aren’t too heavy however I often see this in my error log:
PHP Fatal error: Allowed memory size of 1572864000 bytes exhausted (tried to allocate 97 bytes) in /home/floodlightanalyt/public_html/wp-includes/wp-db.php on line 1775
When this occurs I believe the page being called (that causes the error) stops loading and the user has to reload to access the information. I’ve been through every page being called an all load on their own without any issue.
Looking at the relevant line in the wp-db.php file this is the line that causes the error:
preg_match( '/^\s*(create|alter|truncate|drop)\s/i', $ query ) ) { $ return_val = $ this->result;
i.e. when a database query is being executed. Something is obviously going quite wrong here as I’ve tried upping my memory limit for php resources. Does anyone know how I would go about identifying what is causing this error so I can fix it?