WordPress tries to allocate Terabytes of memory

I am currently running Apache on windows and occasionally it will seemingly instantly spike and try to allocate anywhere from 10s of GB to hundreds of TB of memory. After this error log happens a few times, apache seems to lock up (but only for the specific sites having the errors) and serve nothing but white screens until apache is restarted. The error log says it occurs when processing the functions.php inside the wordpress theme. But runs everytime a page is called, so it isn’t very telling.

The server hosts several word press and custom PHP sites. Those custom sites have never generated a problem. The problematic sites have differing plugins and themes…and what is more strange, some of the unaffected wordpress sites have the same setup as the problematic pages.

I can see no real pattern or specific URL that generates the problem. I have found a post about PHP having some issues with using special characters in regular expressions, but my tests show that isn’t the cause…and i have a newer php version then the one specified to cause the error.

The only other thing I have noticed is I see event viewer errors saying httpd.exe has crashed due to vcruntime140.dll:

Faulting application name: httpd.exe, version: 2.4.20.0, time stamp: 0x57039cd6
Faulting module name: VCRUNTIME140.dll, version: 14.0.23918.0, time stamp: 0x56eb8e78

I have updated my system with the newest visual c runtime to make sure the old wasn’t corrupted, but I still get the same error/crash daily. I am out of ideas.

My server is running the following:

  • Windows 2008 R2
  • Apache 2.4.20 (x64 using VC14)
  • OpenSSL 1.0.2.g
  • PHP 7.0.6 (Threadsafe – x64 using VC14)
  • MySQL 5.6.30 (x64)

Answer

Attribution
Source : Link , Question Author : DontStealMyFish , Answer Author : Community

Leave a Comment