Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We are getting out of memory frequently, as well fork cannot allocate memory. I did some investigation.

It seems that scripts are not case as I thought before this. I will share information which I get after analyzing.

I have isolated server, so other people cant reach to server. This will show "true" memory usage in this case.

  1. I have no mysqld and apache started [memory usage ~182mb].
  2. just started mysqld. no connections made to mysqld [mu ~340mb].
  3. httpd started [~360mb].
  4. first request to script. [~630mb]. But!! The most interesting part. Memory doesn't get deallocated. Everything looks OK. Script ended, page loaded successfuly. But it still around ~630mb.

Why one request eats 270MB? Why thats not deallocated after request?

Some stats:

  • Server RAM 512 MB guaranteed
  • 256 MB burstable
  • PHP memory limit: 256MB


<IfModule prefork.c>
StartServers 1
MinSpareServers 1
MaxSpareServers 3
ServerLimit 50
MaxClients 50
MaxRequestsPerChild  50
share|improve this question
What else is started? ~180MiB RAM after boot into headless system sounds unreasonable. Also, what does that script do? How big is the database backing it up? – Bobby Mar 21 '12 at 13:14
What is exactly "memory usage"? How did you measure it? Is it the one from the first line of free? – Cristian Ciupitu Mar 21 '12 at 13:58
Bobby, this is "ps faux" – Toktik Mar 21 '12 at 15:39
Cristian, yes, it is from "free" command, also from mediatemple server status, which is the same. Also "cat /proc/user_beancounters" – Toktik Mar 21 '12 at 15:39
Looks to me like a bulk of it is going to httpd. – JeffG Mar 22 '12 at 1:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.