What could be the cause of these very unlikely high memory allocations attempts, I notice lately on my production server:
PHP Fatal error: Allowed memory size of 1006632960 bytes exhausted (tried to allocate 51002234388 bytes) in D:\wp\wp-includes\load.php on line 1466
This happened in Wordpress (see error message), but also in Lime Survey.
I'm running PHP 7.4.27 on Windows Apache 2.4.21 on a Windows Server 2008.
The error is consistent (same number of bytes, same script, same line) and remains after a server restart.
Strangely I could get rid of the error in a Lime Survey installation by simply moving all the script files to a different folder.
Edit: Same now: Downloading via FTP all the script files in D:\wp, creating a new directory D:\wp and uploading all the files fia FTP, the error vanished. What's going on here?
Thank you!
CodePudding user response:
To solve this problem check the php.ini
configuration
normally in
/etc/php/php7.4
Insert memory allocation in wp-config.php
And also insert memory limit in .htaccess
Possibly you have hidden malicious code. Check the plugins. So when you made the change of folder the memory was healed. And your memory error did not occur again because in the new folder the plugins were not active.
CodePudding user response:
The cause is most likely plugin related.
I would check:
- wordpress error logs
- php error logs
- Apache error logs
- server error logs
- any pending cron jobs.
- isolate and debug any plugin DB queries.
- are there any heavy reports (DB generated)
Isolating which plugin, can be done by using a live backup, and deleting/disabling plugins one at a time.
Increasing the memory limit may be done through wordpress, but may not bite, unless configured on the server or php level.