Jani,

the most likely cause is too many connected clients.

But without hard data that's a blind guess. Make sure you run at least
at trace_syslog=3.

Next time it happens take a 'snapshot' of your system *before*
restarting dbmail:

ps aux > ps.txt
lsof > lsof.txt
netstat -anlp > netstat.txt

This will give you information about running processes, open files,
network connections etc.

Also, take a good hard look at the logs, both for dbmail and for mysql.

There's bound to be some clues there.

Some additional advise: write a small guardian script that will test the
dbmail services and restart them if something goes wrong. That way you
don't need to wait for angry clients to call. Run it from cron every
minute or so.

Something like:

----
#!/bin/sh

dolog()
{
        _msg="$@"
        echo "$_msg"
        echo "$_msg"|logger -t "$0"
}

restart()
{
        name="$1"
        dolog "restarting $name"
        /etc/init.d/$name restart >/dev/null 2>&1
}

check_dbmail()
{
        pidof dbmail-imapd >/dev/null || return 1
        pidof dbmail-pop3d >/dev/null || return 1
        pidof dbmail-timsieved >/dev/null || return 1
        echo -e '1 capability\n2 logout' | \
                timeout -1 10 nc -w 2 localhost imap | \
                grep '^2 OK' &>/dev/null || return 1
#       timeout 4 nc localhost 24|head -1|grep ^220 &>/dev/null || \
#               return 1
}

check_dbmail || restart "dbmail"
----



Jani Partanen wrote:
> Hello list!
> 
> I have been running dbmail yeast now on CentOS 5 box and it's been
> working very well.
> 
> About 6 month ago I have start to suffer strange imap hangs and I need
> to restart imap almost every day. Sometimes it's even hard to get it
> restarted without restarting whole dbmail.
> 
> I was first thinking that maybe it's something to do that I run v5.1.x
> mysql what is not default for centos, so I did rebuild rpm against
> latest mysql-devel files, but it didn't change nothing.
> 
> Where should I start to track what is the problem? Clients start to get
> pissed and if I can't solve this soon, I'm forced to drop dbmail what I
> don't like to do.
> 
> Thanks!
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> DBmail mailing list
> [email protected]
> http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


-- 
  ________________________________________________________________
  Paul Stevens                                      paul at nfg.nl
  NET FACILITIES GROUP                     GPG/PGP: 1024D/11F8CD31
  The Netherlands________________________________http://www.nfg.nl
_______________________________________________
DBmail mailing list
[email protected]
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail

Reply via email to