Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2008
    Posts
    64

    Exim memory allocation error

    Hello again,

    I am running exim, centos.

    My mail server stopped working this weekend, when I got in today I restarted and all the emails came through. The panic_log shows:
    Code:
    daemon: accept process fork failed: Cannot allocate memory
    several times over the course of a few minutes. Can anyone give me advice on troubleshooting this one?

    Thanks.

  2. #2
    Join Date
    Dec 2007
    Location
    Jakarta
    Posts
    113
    are you running on vps?, this happening to me, then i try to restart exim process, and exim run well,, i hope that help you..

  3. #3
    Join Date
    Feb 2008
    Posts
    64
    BoerChick, that is exactly what I did. And yes, I am on a VPS. My concern is that I have a configuration issue that causes it to fail.

  4. #4
    Join Date
    Feb 2008
    Location
    Houston, Texas, USA
    Posts
    2,955
    You're running out of memory - physical memory. To pour water in the sand, add more memory.

    To find out the root cause, read the logs prior to the memory allocation error. Look for a high rate of log messages over time (time stamps differ in milliseconds). Look at the source address for clues of resource abuse. Look for attachments of abnormal (read excessive) size.

    This is in addition to a meticulous examination of netstat's output (netstat -plant) during the out of memory errors. You could be a victim of an email DDoS.

    Also, I suggest that you install software that can account for resource usage over time like SAR. You can then graph the output for a post-mortem examination.

    Good luck,
    UNIXy - Fully Managed Servers and Clusters - Established in 2006
    [ cPanel Varnish Nginx Plugin ] - Enhance LiteSpeed and Apache Performance
    www.unixy.net - Los Angeles | Houston | Atlanta | Rotterdam
    Love to help pro bono (time permitting). joe > unixy.net

  5. #5
    Join Date
    Feb 2008
    Posts
    64
    Thanks unixy
    I'm definitely a new one to all this, but I am downloading the log file (huge - 36947322) and found this http: // howtoforge.com/ sysstat_monitoring_centos (without spaces of course)
    and now have the cron running for sar. Can you confirm this is the sar you are referring to, or is there something else I should look into?

    Thanks again

  6. #6
    Join Date
    Feb 2008
    Location
    Houston, Texas, USA
    Posts
    2,955
    Quote Originally Posted by clrockwell View Post
    Thanks unixy
    I'm definitely a new one to all this, but I am downloading the log file (huge - 36947322) and found this http: // howtoforge.com/ sysstat_monitoring_centos (without spaces of course)
    and now have the cron running for sar. Can you confirm this is the sar you are referring to, or is there something else I should look into?

    Thanks again
    Yes, that's the software package in question. Now that you have that running in the background, just wait for the problem to recur. You can then run sar against it or download the files to your local computer and use a tool that can graph the data for you. You can then tell from the graph whether the memory usage is abrupt and/or progressive.

    The file is 36MiB (not that huge ). If you have time on your hands, grab the lines that seem interesting. In other words, the lines prior to the memory alloc error.

    Run this line from your shell against the log file:

    grep -B10000 "Cannot allocate memory" file.log > ~/file.log.20080310PM

    Open ~/file.log.20080310PM and investigate. You might want to grab less than 10000 lines depending on your findings.

    GL
    UNIXy - Fully Managed Servers and Clusters - Established in 2006
    [ cPanel Varnish Nginx Plugin ] - Enhance LiteSpeed and Apache Performance
    www.unixy.net - Los Angeles | Houston | Atlanta | Rotterdam
    Love to help pro bono (time permitting). joe > unixy.net

Posting Permissions

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