RE: [Exim] Exim MySQL Problems

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Florian Schicker [Nessus Office]
Dátum:  
Címzett: eli-list, exim-users
CC: ph10
Tárgy: RE: [Exim] Exim MySQL Problems
sorry i forgot to say that i dont have smtp_accept_max_per_host set as a db
lookup.
outgoing mail or local mail does not exist on this server, it's only a
manualroute server in front of the
"real" mailserver. the mysql processes i watched showed all "sleep" state.

the only database lookups are:

hide mysql_servers = localhost/db/user/password

BLOCKEDDOMAINS = ${lookup mysql{SELECT blockeddomains FROM exim}}
WHITEDOMAINS = ${lookup mysql{SELECT whitedomains FROM exim}}
RELAY_TO_DOMAINS = ${lookup mysql{SELECT relaydomain FROM exim_hub where
relaydomain='$domain'}{$value}}
RELAY_FROM_HOSTS = ${lookup mysql{SELECT relay_from_hosts FROM exim}}

smart_route:
    driver = manualroute
    domains = +relay_to_domains
    transport = remote_smtp
    condition = ${lookup mysql {select relaydomain from exim_hub \
                  where relaydomain='$domain'}{$value}}
    route_list = * "${lookup mysql {select smarthost from exim_hub \
                      where relaydomain='$domain'}{$value}}"


---- snap

greetings,

Florian

> -----Original Message-----
> From: Eli [mailto:eli-list@experthost.com]
> Sent: Wednesday, April 28, 2004 10:30 PM
> To: 'Florian Schicker [Nessus Office]'; exim-users@???
> Subject: RE: [Exim] Exim MySQL Problems
>
>
> Florian Schicker wrote:
> > Hi Philip!
> >
> > Ok, that would mean that each smtp connection would only
> need 1 mysql
> > connection.
> > I conclude that the max_connections of mysql must be at least the
> > smtp_accept_max value?
> > that would sound logical but in my case i raised the max_connections
> > value of mysql to 250 at a value of
> > 100 at the smtp_accept_max value.
> > could it be that exim opens one connection for every lookup?
>
> Actually Philip was saying is your smtp_accept_max_per_host
> variable set to
> ${lookup mysql ...}?
>
> See here:
>
> >> A thought has just struck me: have you set smtp_accept_max_per_host
> >> to something that does a MySQL lookup? There seems to be a bug that
> >> could cause this effect if you have.
>
> However, as you stated, it would make sense to ensure that
> you have at least
> the # of connections allowed via incoming SMTP for MySQL as
> well... but are
> you taking in to consideration any outbound emails as well?
>
> Chances are that not only are your incoming SMTP connections
> making an SQL
> connection, but any outbound email (IE, generated locally, or
> any queue
> runners) is also making a connection, thus you in fact need
> much more than
> just what you have for smtp_accept_max.
>
> What you could do is monitor the # of processes to MySQL at
> intervals and
> see how many connections there are - you could even see what
> they're trying
> to do so if they're idle connections or what have you.
>
> Eli.
>