anton_latvia

Well-Known Member
PartnerNOC
May 11, 2004
432
47
178
Latvia
cPanel Access Level
Root Administrator
A very strange error. Usually error is "Failed to allocate....", which is easily being fixed by changing memory_limit. But on this site memory_limit is set quite high - to 1gb (some crappy plugin, eating a lot of memory on export). And this error "out of memory" pops at around 600+mb and of course, stops.

I have searched google, but could not figure out reason. Yes, we are using CloudLinux. I was thinking, that CL might be limit this - sure, but I have disabled CageFS and disabled any limits for this account - no limit neither for CPU nor for memory. But still we get this.

Anyone serious suggestion?
 
Last edited by a moderator:

anton_latvia

Well-Known Member
PartnerNOC
May 11, 2004
432
47
178
Latvia
cPanel Access Level
Root Administrator
[19-Dec-2019 05:20:02 UTC] PHP Fatal error: Out of memory (allocated 682196992) (tried to allocate 16384 bytes) in /home/user/public_html/wp-includes/wp-db.php on line 2030

Nothing in /var/log/messages. Server has 32gb of ram.
 

rpvw

Well-Known Member
Jul 18, 2013
1,100
472
113
UK
cPanel Access Level
Root Administrator
Last edited by a moderator:

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,300
363
Houston
The way the error was worded originally made me think that it wasn't the standard PHP memory_limit error. This does in fact look as such. The site that @rpvw linked may be helpful as regardless of your settings having set the memory_limit to 1024M WordPress has its own built-in memory limit that can be defined. This is discussed in that first link and you may want to try defining it first.

Another thing you may want to look at is to ensure that, though you've modified the php memory limit in WHM, you may want to confirm that it is not set to a more restrictive value in the user's home directory - cPanel>>Software>>MultiPHP INI Manager a simple phpinfo page would suffice to check this
 

anton_latvia

Well-Known Member
PartnerNOC
May 11, 2004
432
47
178
Latvia
cPanel Access Level
Root Administrator
No, it must be something else.. I tried setting define( 'WP_MEMORY_LIMIT', '1024M' ); with no luck. The RLimitMEM for apache is disabled. phpinfo() tells, that the limit is 1gb. Normally, when it is PHP limit - the error is "Allow memory size xxx exhausted", but here it is "Out of memory". This makes me think, that this is somehow more related to OS limitation, although, as I mentioned, everything is set to unlimited in CloudLinux LVE manager.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
14,359
2,249
363
cPanel Access Level
Root Administrator
Hey there! For this issue, especially where it is possible to reproduce the problem on the machine, it may be best to get a ticket submitted to our support team at tickets.cpanel.net so we can log in and check the system. If you reply with the ticket number here we can update this thread so everyone can see the results once the issue is resolved.
 

anton_latvia

Well-Known Member
PartnerNOC
May 11, 2004
432
47
178
Latvia
cPanel Access Level
Root Administrator
Your Support Ticket ID is: 93409234

I copied this account to non-cPanel and non-CloudLinux server and it did not produce this error, this seems to be either local server limitation or CloudLinux issue.
 

Randem

Member
Dec 24, 2019
13
2
3
Hawaii
cPanel Access Level
Root Administrator
The issue seems to be the data that is being sent to the database driver in /home/user/public_html/wp-includes/wp-db.php on line 2030
line 2030 is

$this->result = mysqli_query( $this->dbh, $query );


This indicate that most likely that the query that is being executed is retrieving too much data for the memory requirements. DO NOT increase memory limits. That would only be a short term solution and a bad one at that. It is better to determine what query is being executed to find out exactly what resultset is being returned and you should find your answer. You can run the query in PHPmyAdmin to see the resultset. If the resultset is too big you may need to do an unbuffered query to get the results one row at a time.

Set these items in you wp-config.php file to help


define('WP_DEBUG', true);
define('WP_DEBUG_DISPLAY', true);
define('WP_DEBUG_LOG', true);



Check the debug.log file in wp-contents to see what is happening.
 
  • Like
Reactions: cPRex