I've inherited a highly problematic site built in Drupal 7. Upon installing the site on my dev space I get a 'This page isn’t working' error 500. Looking at the web logs I get this message:
lmu.[sitename].co.uk [Sat Apr 23 15:39:03 2022] [error] [client
86.174.32.32:0] AH01215: PHP Fatal error: Out of memory (allocated 56098816) (tried to allocate 459743 bytes) in
/home/sites/[sitename].co.uk/public_html/lmu/includes/database/database.inc
on line 2324: /home/sites/[sitename].co.uk/public_html/lmu/index.php
The memory_limit was 128M and is now 512M but I get exactly the same error with the same numbers etc.
Is this to do with something contained within the DB?
Additional Edits:
Another, maybe related, issue is that on another server the site runs but only with PHP 5.6 (both updated and non-updated versions of the site). On the server that this question pertains to it is also running 5.6. However, when I attempt to use 7.4 the site still fails but I get a different error message relating to the Database that might provide further clues:
Uncaught exception thrown in shutdown function.
PDOException: SQLSTATE[HY000]: General error: 2014 Cannot execute
queries while other unbuffered queries are active. Consider using
PDOStatement::fetchAll(). Alternatively, if your code is only ever
going to run against mysql, you may enable query buffering by setting
the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute.: DELETE FROM
{semaphore} WHERE (value = :db_condition_placeholder_0) ; Array (
[:db_condition_placeholder_0] => 15563655396262a9bd4cef06.08066829 )
in lock_release_all() (line 269 of
/home/sites/[sitename].co.uk/public_html/lmu/includes/lock.inc).