Chris Kenward
asked on
How do I stop Virtual Memory Errors on VPS
I am continually getting this error from one of our VPS servers
Time: Wed Apr 3 08:55:22 2019 +0100
Account: accountname
Resource: Virtual Memory Size
Exceeded: 561 > 512 (MB)
Executable: /opt/cpanel/ea-php70/root/ usr/bin/ph p-cgi
Command Line: /opt/cpanel/ea-php70/root/ usr/bin/ph p-cgi
PID: 12755 (Parent PID:2746)
Killed: No
Eventually the server hangs and I have to reset it to get it going again. This is obviously caused by something I have not set up correctly and I'm hoping that someone can help me set it right. Many thanks in anticipation.
Chris
Time: Wed Apr 3 08:55:22 2019 +0100
Account: accountname
Resource: Virtual Memory Size
Exceeded: 561 > 512 (MB)
Executable: /opt/cpanel/ea-php70/root/
Command Line: /opt/cpanel/ea-php70/root/
PID: 12755 (Parent PID:2746)
Killed: No
Eventually the server hangs and I have to reset it to get it going again. This is obviously caused by something I have not set up correctly and I'm hoping that someone can help me set it right. Many thanks in anticipation.
Chris
This question is answered here
ASKER
Hi - thanks for getting back to me.
I looked at the post you pointed me at. All I get from that is to increase the PT_USERMEM to stop the notifications. However, how is this going to stop the server from eventually hanging and requiring a reset?
Cheers
Chris
I looked at the post you pointed me at. All I get from that is to increase the PT_USERMEM to stop the notifications. However, how is this going to stop the server from eventually hanging and requiring a reset?
Cheers
Chris
add the entry "memory_limit = 2048M" to your php.ini
that should work.
that should work.
ASKER
Hi there - I have done this. Will wait to see if it works. Many thanks.
ASKER
Hi there - I got this one a little while ago...
Time: Wed Apr 3 16:53:34 2019 +0100
Account: accountname
Resource: Virtual Memory Size
Exceeded: 588 > 512 (MB)
Executable: /opt/cpanel/ea-php70/root/ usr/sbin/p hp-fpm
Command Line: php-fpm: pool domain_co_uk
PID: 4392 (Parent PID:23045)
Killed: No
Time: Wed Apr 3 16:53:34 2019 +0100
Account: accountname
Resource: Virtual Memory Size
Exceeded: 588 > 512 (MB)
Executable: /opt/cpanel/ea-php70/root/
Command Line: php-fpm: pool domain_co_uk
PID: 4392 (Parent PID:23045)
Killed: No
cgi & fpm use different .ini files.
So you need to update the ini file for PHP-FPM now.
So you need to update the ini file for PHP-FPM now.
Are you sure your ini file is the one that's currently in use?
You find the location of the ini file by opening a shell and entering
You find the location of the ini file by opening a shell and entering
php -i | grep "Loaded Configuration File"
ASKER
Hi there brb6708
This is what I get:
/opt/cpanel/ea-php70/root/ etc/php.in i
It's the only version of php on the server.
I have edited the files with the values we discussed.
Cheers
Chris
This is what I get:
/opt/cpanel/ea-php70/root/
It's the only version of php on the server.
I have edited the files with the values we discussed.
Cheers
Chris
ASKER
@noci
What values will I need to put in there for php v 7.0 ?
Thanks
Chris
What values will I need to put in there for php v 7.0 ?
Thanks
Chris
Memory limit is one: http://php.net/memory-limit
Now fpm also has some other controls..
that control the fpm service process:
And maybe you can set some rsource limts there
Also there the memory_limit can be set: php_admin_value[memory_lim it]
If you cannot control this fpm.conf - conffile then
you may need to contact your hosting provider.
Now fpm also has some other controls..
that control the fpm service process:
And maybe you can set some rsource limts there
Also there the memory_limit can be set: php_admin_value[memory_lim
If you cannot control this fpm.conf - conffile then
you may need to contact your hosting provider.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.