Blog

Aug
04
2012

Out of Memory PHP Apache WHM and VPS

This is a quick blog post about something that took me a while to find the solution for. I was creating an upload script for a customers site and running it on my virtual server. While I was uploading I got an error “Out of Memory”, I checked my limits and I had 256MB at my disposal. This had me stumped for a while as all I could find about this error was about how I need to increase my memory limit but this was not the case. Eventually I came across one comment on one blog with the solution; because my server is VPS I need to disable the “Memory Usage Restrictions”.
I needed to edit my apache config file:


nano /etc/httpd/conf/http.conf

and disable the restriction by the commenting out the first two restrictions:


#RLimitMEM 89478485
#RLimitCPU 240

Then restart apache

httpd restart

This fixed the issue for me.

Posted in Apache | 3 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Copyright © 2012 by damiandennis.com.
All Rights Reserved.