I have a wordpress blog, with complicated plugins and theme. I recently hit fatal error cannot allocate memory error on 256mb. 256 itself is allot, so I got rid of 1 plugin and it went back to 60MB, which still seems a bit high but ok.

My question is this,

How does php usage increase over number of users increased?

If I load wordpress dashboard and it takes 60mb of ram, will 2 users loading same page eat up more ram? (leaving aside all caching methods).

  • Are you sure this is a fault of PHP or the plug in, or are you saying the plug in was written in PHP? As for how a langauge (or more accurately the code which has been written in that language) uses memory is very specific to each program. I can write a short program which will max out all the RAM, or bigger programs which are quite efficient. And it depends on the plug in - the plug in may require X amount of RAM but can be shared by various users where as others will require their own unique instances.
    – Dave
    Dec 7 '12 at 9:47
  • @DaveRook can you give example of code that consumes all memory? must be an infinite loop?
    – user98645
    Dec 7 '12 at 11:22
  • Look up "memory leaks" - more difficult in .NET but, when using unmanaged code it is possible! An infinite array trying to put itself on the stack would do it too :)
    – Dave
    Dec 7 '12 at 12:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy