{"id":927,"date":"2012-11-28T00:49:37","date_gmt":"2012-11-28T06:49:37","guid":{"rendered":"http:\/\/blog.supportpro.com\/?p=927"},"modified":"2026-03-26T23:01:20","modified_gmt":"2026-03-27T05:01:20","slug":"issue-fatal-error-out-of-memory","status":"publish","type":"post","link":"https:\/\/www.supportpro.com\/blog\/issue-fatal-error-out-of-memory\/","title":{"rendered":"Why PHP Memory Limit Changes Don\u2019t Work in WHM ?"},"content":{"rendered":"\n<p>Sometimes increasing the PHP memory limit in <code>php.ini<\/code> does not resolve memory-related errors. Even after updating the configuration, applications like WordPress may still display <strong>out of memory<\/strong> errors.<\/p>\n\n\n\n<p>This usually happens because Apache memory restrictions override PHP settings.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why PHP Memory Limit Changes May Not Work<\/h2>\n\n\n\n<p>In cPanel\/WHM servers, Apache can enforce its own memory limits independent of PHP configuration.<\/p>\n\n\n\n<p>You should verify the following WHM setting:<\/p>\n\n\n\n<p><strong>WHM \u2192 Service Configuration \u2192 Apache Configuration \u2192 Memory Usage Restrictions<\/strong><\/p>\n\n\n\n<p>This feature controls Apache\u2019s memory usage based on historical resource consumption.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How Memory Usage Restrictions Work<\/h2>\n\n\n\n<p>The Memory Usage Restrictions option:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Limits memory usage per Apache process<\/li>\n\n\n\n<li>Improves overall server stability<\/li>\n\n\n\n<li>Prevents excessive resource consumption<\/li>\n\n\n\n<li>May slightly reduce performance<\/li>\n<\/ul>\n\n\n\n<p>When enabled, WHM automatically adds the following directive to the Apache configuration:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>RLimitMEM XXX<\/code><\/pre>\n\n\n\n<p>Here, <strong>XXX<\/strong> represents the maximum memory allowed for each Apache process.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why This Causes PHP Memory Errors<\/h2>\n\n\n\n<p>If <code>RLimitMEM<\/code> is configured:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Apache restricts process memory usage<\/li>\n\n\n\n<li>PHP cannot exceed this limit<\/li>\n\n\n\n<li>Increasing <code>memory_limit<\/code> in <code>php.ini<\/code> becomes ineffective<\/li>\n<\/ul>\n\n\n\n<p>This commonly affects applications such as:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>WordPress<\/li>\n\n\n\n<li>CMS platforms<\/li>\n\n\n\n<li>Large PHP applications<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">How to Fix the Issue<\/h2>\n\n\n\n<p>To allow PHP memory changes to work:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Locate the Apache configuration file.<\/li>\n\n\n\n<li>Find the directive:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>RLimitMEM XXX<\/code><\/pre>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li>Remove or comment out this line.<\/li>\n\n\n\n<li>Restart Apache services.<\/li>\n\n\n\n<li>Increase the required value in <code>php.ini<\/code>.<\/li>\n<\/ol>\n\n\n\n<p>After removing the restriction, PHP memory settings will function correctly.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>If PHP memory limit updates are not taking effect, the issue is often caused by Apache\u2019s Memory Usage Restrictions in WHM. Adjusting or disabling the <code>RLimitMEM<\/code> directive resolves most out-of-memory errors.<\/p>\n\n\n\n<p>If you require help, <a href=\"https:\/\/www.supportpro.com\/requestquote.php\">contact SupportPRO Server Admin<\/a><\/p>\n\n\n\n<p class=\"has-text-align-center\"><span id=\"hs-cta-wrapper-9d590242-d641-4383-94b4-8cfd62f0af6b\" class=\"hs-cta-wrapper\"><span id=\"hs-cta-9d590242-d641-4383-94b4-8cfd62f0af6b\" class=\"hs-cta-node hs-cta-9d590242-d641-4383-94b4-8cfd62f0af6b\"><a href=\"https:\/\/cta-redirect.hubspot.com\/cta\/redirect\/2725694\/9d590242-d641-4383-94b4-8cfd62f0af6b\"><\/a><\/span><\/span><\/p>\n\n\n\n<div class=\"wp-block-media-text alignwide has-media-on-the-right is-stacked-on-mobile is-vertically-aligned-center has-white-background-color has-background\"><div class=\"wp-block-media-text__content\">\n<p class=\"has-large-font-size\">Facing issues? <\/p>\n\n\n\n<p class=\"has-large-font-size\">Our technical support<br>engineers can solve it. <\/p>\n\n\n\n<!--HubSpot Call-to-Action Code --><span class=\"hs-cta-wrapper\" id=\"hs-cta-wrapper-3350a795-db50-482f-9911-301930d1b1be\"><span class=\"hs-cta-node hs-cta-3350a795-db50-482f-9911-301930d1b1be\" id=\"hs-cta-3350a795-db50-482f-9911-301930d1b1be\"><!--[if lte IE 8]><div id=\"hs-cta-ie-element\"><\/div><![endif]--><a href=\"https:\/\/cta-redirect.hubspot.com\/cta\/redirect\/2725694\/3350a795-db50-482f-9911-301930d1b1be\" ><img decoding=\"async\" class=\"hs-cta-img\" id=\"hs-cta-img-3350a795-db50-482f-9911-301930d1b1be\" style=\"border-width:0px;\" src=\"https:\/\/no-cache.hubspot.com\/cta\/default\/2725694\/3350a795-db50-482f-9911-301930d1b1be.png\"  alt=\"Contact Us today!\"\/><\/a><\/span><script charset=\"utf-8\" src=\"https:\/\/js.hscta.net\/cta\/current.js\"><\/script><script type=\"text\/javascript\"> hbspt.cta.load(2725694, '3350a795-db50-482f-9911-301930d1b1be', {\"useNewLoader\":\"true\",\"region\":\"na1\"}); <\/script><\/span><!-- end HubSpot Call-to-Action Code -->\n<\/div><figure class=\"wp-block-media-text__media\"><img fetchpriority=\"high\" decoding=\"async\" width=\"904\" height=\"931\" src=\"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup.png\" alt=\"guy server checkup\" class=\"wp-image-12943 size-full\" srcset=\"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup.png 904w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup-291x300.png 291w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup-768x791.png 768w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup-585x602.png 585w\" sizes=\"(max-width: 904px) 100vw, 904px\" \/><\/figure><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes increasing the PHP memory limit in php.ini does not resolve memory-related errors. Even after updating the configuration, applications like WordPress may still display out of memory errors. This usually&hellip;<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-927","post","type-post","status-publish","format-standard","hentry","category-miscellaneous"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/927","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/comments?post=927"}],"version-history":[{"count":6,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/927\/revisions"}],"predecessor-version":[{"id":16710,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/927\/revisions\/16710"}],"wp:attachment":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/media?parent=927"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/categories?post=927"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/tags?post=927"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}