ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Server out of memory

October 31, 2010 8:45am

Subscribe [6]
  • #1 / Oct 31, 2010 8:45am

    Studio Hert

    36 posts

    Hi

    I’m hosting a site on a virtual dedicated server. From time to time, the server has to be restarted because it ran out of memory (it has 256 MB memory). The site that causes the problems is http://www.kwadratuur.be

    I used the tips found in “handling extreme traffic”, however, it doesn’t seem to make any difference.

    For your information, here are some things you might want to know:
    http://www.kwadratuur.be/stats.html
    http://www.kwadratuur.be/phpinfo.php

    Any advice on how to avoid these errors?


    Thanks

    Bart

  • #2 / Oct 31, 2010 10:40am

    handyman

    509 posts

    This problem most likely has nothing to do with EE…...but is somewhere in the server setup….

    I’m not enough of a tech to completely troubleshoot….but, there are a few places you can look for hits…..

    If you have logging (httpd) turned on, check the log from about the time when the errors occurred. It could be that you have a nasty script somewhere on the site (I had this happen once)......

    If your logs are OK…..my advice would be to turn off all httpd logging.

    Check your server messages…usually under var directory…to see if anything looks funny.

    Use either phpmyadmin or one of the mysql tuneup tools (free) to see what they say about your mysql memory allocation. That is a very small amount of memory (256), however the site traffic is low…......these tools show whether a mysql setting (the cnf file) should be tweaked.

    If you find that the problem seems to happen less when the server is restarted (for instance, after a week or so), you can set up a cron job to restart just the main tewo processes…....mysql and apache. This will not really interrupt a user if done right…....you could make it restart them every week, or every two days, etc.

    Hope that helps….in general, this is a job for your server admin (ISP)....they should be able to look after the problem occurs and see why…

  • #3 / Oct 31, 2010 12:25pm

    KeithW

    138 posts

    A previous similar post about memory usage with EE2 is at
    http://ellislab.com/forums/viewthread/131219/

    If you are using a virtual dedicated server then maybe there
    is no reason for not running PHP as a module rather than CGI?

  • #4 / Oct 31, 2010 6:27pm

    Studio Hert

    36 posts

    Hi,

    The thread you are referring to is for beta testers only…?

    The webhost told me to upgrade to a VDS with more memory, but maybe that’s just the easiest solution for them?

    Anyway: the reason why I thought this might be an EE issue, is because I never had this problem when the site was based on another CMS. Problems started when I made a EE site of it. And it happened on 3 different servers from 3 different webhosts now…

  • #5 / Oct 31, 2010 7:55pm

    KeithW

    138 posts

    Are you using Expression Engine 2 or Expression Engine 1? Which version?
    Are you serving many photos or videos from your web site? Or large file downloads? Are you using third-party plugins?
    The default memory assignment for PHP is only 32MB, but some people have increased that to 64MB.
    If you have 256MB and are still running out of memory then it sounds as if something is very wrong.
    Maybe some users are making multiple log-ons and keeping their sessions open, or maybe there’s a memory leak.
    You can find how to check PHP memory usage by searching on the Internet.

  • #6 / Nov 01, 2010 10:01am

    Sue Crocker

    26054 posts

    Bart, how many third party add-ons are you using? For instance, there are some add-ons that are memory intensive, anything having to do with file uploading/resizing. Might that be the case?

    Looking at your phpinfo information - your memory_limit is set to 128M, not 256M.

  • #7 / Nov 01, 2010 7:55pm

    madisonjds

    9 posts

    my recent memory problem was exactly as Sue stated, it was the Moblog image re-sizing/uploading of 2.5mb files from an iPhone/email, it worked fine if the original image was smaller, like 700k

    fyi

  • #8 / Nov 02, 2010 3:27pm

    Ingmar

    29245 posts

    Thanks, madisonjds. Bart, could you kindly answer Sue’s questions?

  • #9 / Nov 04, 2010 10:33am

    Studio Hert

    36 posts

    Hi,

    Sorry for my late reply, thank you for all the help so far.

    I’m using the ImageSizer plugin, so probably that plugin is causing the problem? I checked, and some editors from the site upload pictures that are 5 MB and more. The problem is I use the nGen File field, and that fieldtype doesn’t have automatic resizing built in. I’m afraid that if I go back to Mark Huot’s file plugin, all the images will stop working.

  • #10 / Nov 04, 2010 5:13pm

    Ingmar

    29245 posts

    I am afraid these are all third party add-ons. What happens when you use the built-in EE file upload?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases