SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Addict
    Join Date
    Feb 2004
    Posts
    291
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Apache: Out of memory

    We run Apache on Windows server.

    We often get this error message in the log files: Fatal: Out of memory (allocated 3670016) (tried to allocate 2621440 bytes).

    The server has a lot of free memory. How do i "allocate" more memory to Apache?

  2. #2
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,653
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    materix,

    Actually, it may not have a lot of free memory! Please remember that Apache runs a number of children at any one time (some to handle requests and others to listen for incoming requests). When you have a memory hog application running, it will limit the other children and, if one of them get the same request, it could easily cause a memory problem.

    How to handle it? The first step is to contact your host (who will likely try to upsell their services - as this may be your only way out) but they may have a way to throttle the requests on the memory hog request, too.

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  3. #3
    SitePoint Addict
    Join Date
    Feb 2004
    Posts
    291
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    David, thanks for the reply.

    I forgot to mention that this is a virtual windows server, which we have full control over. It has 6 GB of memory, most of it is not used.

    Normally the Apache process only uses about 250 Mb of memory, but still gives out of memory errors. Is there perhaps some memory limit in php.ini or httpd.conf which is set to low?

  4. #4
    Utopia, Inc. silver trophy
    ScallioXTX's Avatar
    Join Date
    Aug 2008
    Location
    The Netherlands
    Posts
    9,081
    Mentioned
    153 Post(s)
    Tagged
    2 Thread(s)
    php does have a max memory limit, which is memory_limit in php.ini and is set to 128MB by default.

    AFAIK Apache doesn't have a hard memory limit but just takes more memory when needed.
    Rémon - Hosting Advisor

    SitePoint forums will switch to Discourse soon! Make sure you're ready for it!

    Minimal Bookmarks Tree
    My Google Chrome extension: browsing bookmarks made easy

  5. #5
    From space with love silver trophy
    SpacePhoenix's Avatar
    Join Date
    May 2007
    Location
    Poole, UK
    Posts
    5,032
    Mentioned
    103 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ScallioXTX View Post
    php does have a max memory limit, which is memory_limit in php.ini and is set to 128MB by default.

    AFAIK Apache doesn't have a hard memory limit but just takes more memory when needed.
    Quote Originally Posted by materix View Post
    We run Apache on Windows server.

    We often get this error message in the log files: Fatal: Out of memory (allocated 3670016) (tried to allocate 2621440 bytes).

    The server has a lot of free memory. How do i "allocate" more memory to Apache?
    That looks suspiciously like a php error. Are you running php? Is it always the same script that's causing the error?
    Community Team Advisor
    Forum Guidelines: Posting FAQ Signatures FAQ Self Promotion FAQ
    Help the Mods: What's Fluff? Report Fluff/Spam to a Moderator


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •