Error: Out of memory (allocated X) (tried to allocate X bytes)

Hi all,

I’m having problems with the CRM, every 10 minutes I get this in the Apache log:

Parent: child process 11808 exited with status 255 – Restarting.
Apache/2.4.38 (Win64) PHP/7.2.15 configured – resuming normal operations
Apache Lounge VC15 Server built: Jan 18 2019 14:26:34
Command line: ‘C:\…\bin\httpd.exe -d C:/…/Apache24’
Parent: Created child process 8784
Child: Starting 1500 worker threads.

Then just after that “restarting” i get this:

[php7:error] PHP Fatal error: Out of memory (allocated 12582912) (tried to allocate 4096 bytes) in C:…\suitecrm\include\language\en_us.lang.php on line 3112, referer: http://…/suitecrm/index.php?module=MODULE_NAME&action=index
[php7:error] PHP Fatal error: Out of memory (allocated 12582912) (tried to allocate 4096 bytes) in C:…\suitecrm\include\language\en_us.lang.php on line 3110, referer: http://…/suitecrm/index.php
[php7:error] PHP Fatal error: Out of memory (allocated 12582912) (tried to allocate 4096 bytes) in C:…\suitecrm\include\language\en_us.lang.php on line 3110, referer: http://…/suitecrm/index.php
[php7:error] PHP Fatal error: Out of memory (allocated 2097152) (tried to allocate 4096 bytes) in C:…\suitecrm\include\utils.php on line 3013, referer: http://…/suitecrm/index.php

The CRM is very slow cause of this, and the CPU is almost always above 90%.

Thank you in advance.

@alberto_90

Welcome to community!

What kind of server do you use? Maybe it’s weak very much.

@p.konetskiy

Runing on Windows server 2012 R2 apache 2.4 php 7.2
Virtual machine 16 cores and 32 Gb Ram

i guess is cause the number of users connected to CRM, and all the conections of each one have, i’m thinking to limit the connection to each user.
But maybe is because a infinite loop, not sure. (The RAM is stable at 30% more or less)

That’s not a weak server at all… :open_mouth:

It could be the settings in php.ini, especially memory_limit but maybe also others.

Remember you probably have TWO php.ini’s in your system, one for web server and one for core.

You can go in Admin / Diagnostics, and get the phpinfo file. Unzip it and check your effective php.ini values for web server.

For the CLI, try running php -i from the command prompt.

EDIT: also check if this :point_down: is a good setting, I don’t know, but it sounds like a lot:

Child: Starting 1500 worker threads.

1 Like

I believe there is a problem with the apache settings. If you have daemons in your code, they don’t work properly.
Do you actively use the bell in the system ?, if not, disabling background requests to the alert module can reduce your load.
do other services use your system ? If so, I recommend making a separate instance of the system for requests.

@pgr That 1500 worker threas coming from Apache httpd.conf:

ThreadLimit 1500 ThreadsPerChild 1500 MaxConnectionsPerChild 0

@palach We dont use the bell (notification), where i can disable it, in the code?