Re: [exim] Re: Too many connections, SMTP timeout problems

Top Page
Delete this message
Reply to this message
Author: Rory Campbell-Lange
Date:  
To: 2005reply
CC: exim-users
Subject: Re: [exim] Re: Too many connections, SMTP timeout problems
Hi Martin

Thanks for your note. Thought I was going mad!

lsof shows growing numbers of SMTP connections, in the following state:

    exim4      6461 Debian-exim    0u  IPv4 656765       TCP myserver:smtp->mail2.myisp.net:50192 (CLOSE_WAIT)
    exim4      6461 Debian-exim    2u  IPv4 656765       TCP myserver:smtp->mail2.myisp.net:50192 (CLOSE_WAIT)
    exim4      6461 Debian-exim    3u  IPv4 656781       UDP myserver:35897->ns1.myisp.net:domain


Eventually the number of allowable concurrent smtp connections is exhausted.

I'm going to file a Debian bug report and see what happens.

Thanks,
Rory

On 08/01/05, Martin Nicholas (mgn@???) wrote:
> This is a bit like my "SMTP connections from *.client.comcast.net" problem,
> see the archive. The problem has almost ceased without intervention by myself
> leading me to believe that there are external forces at work. The orphanned
> Debian-Exim4 processes remain a problem though.
>
> I have written a perl program to termiinate over-running Exim4 processes after
> a configurable amount of time.
> This works, but I'm worried there might be a little memory leak.


Well, my scripting is dreadful, but at the moment I'm having to run the
following every 4 hours:

    #!/bin/bash
    # exim_restarter.sh
    # Rory Sat Jan  8 22:31:10 GMT 2005


    export PATH="${PATH}:/usr/sbin:/sbin"


    function lists () {
            echo "ps"
            ps aux | grep exim
            echo ""
            echo "lsof"
            lsof -i | grep exim
    }


    echo "Restarting exim processes."
    echo "--------------------------"
    lists
    /etc/init.d/exim4 stop
    sleep 3
    echo "" 


    if $( ps aux | grep exim | grep -v grep | grep -v restart 2>&1 >/dev/null ) ; then
            echo "Explicit kills required"
            ps aux | grep exim | grep -v grep | grep -v restart
            kill $(ps aux | grep exim | grep -v grep | grep -v restart | awk {'print $2'}) 2>&1 >/dev/null
    else
            echo "No explicit kills required"
    fi
    echo ""
    /etc/init.d/exim4 start
    sleep 3
    echo ""
    echo "Restarted exim processes."
    echo "-------------------------"


    lists


--
Rory Campbell-Lange
<rory@???>
<www.campbell-lange.net>