Fatal Error: Out of memory for Wordpress
Posted by: bb2j3z (---.pitbpa.fios.verizon.net)
Date: February 07, 2022 08:40PM

Using this on a Windows server

Wampserver 3.1.9
Apache 2.4.39
PHP 7.2.18
MySQL 5.7.26

We are occasionally getting Fatal error: out of memory (allocated 2097152) tried to allocate 4096 bytes)) in E:\Websites\wfb-intranet\wp-includes\meta.php on line 1081.

When I restart the service everything seems to be fine.

I've tried updating the php.ini file for memory_limit from 128M to 512M but it still shows as 128M in the Wampserver settings. Is there a way to override? I tried editing the php.ini file in the PHP version it is using.

In C:\wamp\bin\php\php7.2.18.

Options: ReplyQuote
Re: Fatal Error: Out of memory for Wordpress
Posted by: Otomatic (Moderator)
Date: February 07, 2022 09:17PM

Hi,

> Wampserver 3.1.9
Out of date !

- 1 - Verify that all VC ++ packages are installed and with the latest versions.
To do this, use the tool:
Checks VC++ packages installed
Do not use a previously loaded tool. Make a new download to make sure you are using the correct version.[/u)
To download missing packages, do not rely on Microsoft links, they are not reliable, download packages on http://wampserver.aviatechno.net in section Visual C++ Redistribuable Packages
Do not forget that if you have a 64 bit Windows, you must install both 32 and 64 bit versions of each package.
You must install each package "as an administrator", so right-click the exe file and then run as Administrator.

- 2 - apply Update 3.2.7 to your version of Wampserver
Wampserver update 3.2.7

> Apache 2.4.39
Out of date.
Install and switch to Apache 2.4.52

And, if you want to increase the memory limit of PHP, use the built-in tools of Wampserver:

Left-Click Wampmanager icon -> PHP -> PHP settings -> Memory limit -> Choose value you need

Nota : Very few hosts will allow you to exceed 128M for PHP.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: Fatal Error: Out of memory for Wordpress
Posted by: bb2j3z (---.pitbpa.fios.verizon.net)
Date: February 08, 2022 04:40PM

We control the web server, I can remote into Windows. So I can change settings. I tried this,

>And, if you want to increase the memory limit of PHP, use the built-in tools of Wampserver:
>
>Left-Click Wampmanager icon -> PHP -> PHP settings -> Memory limit -> Choose value you need

But it never changed the value. When I went back in, it was still set to 128M. Do I need to have an administrator do this? I was thinking I could just find the php.ini file in the appropriate PHP path and edit this... but not sure if Wampserver is getting this from somewhere else than.

C:\wamp\bin\php\php7.2.18

Options: ReplyQuote
Re: Fatal Error: Out of memory for Wordpress
Posted by: RiggsFolly (Moderator)
Date: February 08, 2022 04:56PM

It does get it from somewhere else, the other option to ensure you amend the correct `php.ini` is to use the wampmanager icon again and do
left click wampmanager->PHP->php.ini
This should open php.ini with your default editor.

Find

memory_limit = 128M

and change 128 to 256 or 512.

Then save the file, exit the editor and then restart Apache to make the parameter active

left click wampmanager->Apache->Service Administration->restart Service

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: Fatal Error: Out of memory for Wordpress
Posted by: Otomatic (Moderator)
Date: February 08, 2022 06:29PM

Hi,

> We control the web server, I can remote into Windows. So I can change settings.
So, basically, you are using Wampserver as a production server, which it is not designed for.

This means that you let the log files grow, grow and grow until you want to change the version or any settings of Apache, PHP or MySQL.
And there, it does not pass because, by default, Wampserver makes an automatic procedure of cleaning of the log files during the procedure Refresh made at the time of each modification Apache, PHP, etc.
The logs being very big, the procedure cannot clean them and passes in fatal error.

What you need to do is:
Right-click -> Tools -> Empty logs -> Empty all log files -> Y
then
Right-click -> Wamp setings -> Automatic cleanup -> Clean up log files automatically ... to uncheck it

> C:\wamp\bin\php7.2.18
This is not installed by Wampserver.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: Fatal Error: Out of memory for Wordpress
Posted by: bb2j3z (---.pitbpa.fios.verizon.net)
Date: February 24, 2022 05:26PM

>
>What you need to do is:
>Right-click -> Tools -> Empty logs -> Empty all log files -> Y
>then
>Right-click -> Wamp setings -> Automatic cleanup -> Clean up log files automatically ... to uncheck it

Okay I did this then it seemed like I was able to change the memory_limit to 512M in the wampserver interface. So think I may be good. Thanks.

Options: ReplyQuote


Sorry, only registered users may post in this forum.