RE: [exim] losing mysql connection during query?

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Steve Taylor
Date:  
À: exim-users
Sujet: RE: [exim] losing mysql connection during query?
On 10 Nov 2004, Tim Jackson wrote:

> > temporarily rejected RCPT<user@???>: MYSQL: query failed: Lost
> > connection to MySQL server during query
>
> Sounds like your MySQL server is unhappy. Is there anything interesting in
> /var/lib/mysql/<hostname>.err ? Perhaps you've exceeded the maximum
> connection count (I'm not sure if this would cause the symptoms you're
> seeing, but it's possible)? If so, bump it up in /etc/my.cnf e.g.
> "set-variable = max_connections=200". (assuming you have the resources to
> support that of course)
>
> Tim


Thanks for your advice. I tried bumping up the max_connections to 200, and
also tried increasing the connect_timeout to 60, but still got the same
problems. Then I noticed that the problem only occurred when there was an
ident timeout AND a warning from my helo or rcpt acl. I switched off idents
(rfc1413_query_timeout = 0s) on 22nd Nov and have not seen the problem
since. Previously the ident timeout was set at the default 30s.

Until recently, I'd had absolutely no problem with idents or mysql. Has
anyone else experienced similar problems? Am I missing out by not having
idents enabled?

Another (unedited) example from Exim's main log is shown below. Still not
sure where the strange 'f^@^@^@^C' character string is coming from? And the
'T-Warn:' at the end of that line looks like the last few characters of the
'Qonnect-PROTECT-Warn:' header that I've added from the ACL?

Should I try with the lastest version of Exim? Am currently running with a
version of 4.34 built from source back in May.

Sorry for the barrage of questions!

thanks,

Steve

Extract from the Exim main log...
2004-11-22 07:10:09 SMTP connection from [81.195.20.87]:46590 (TCP/IP
connection count = 1)
2004-11-22 07:10:09 SMTP connection from [81.195.20.87]:46592 (TCP/IP
connection count = 2)
2004-11-22 07:10:39 ident connection to 81.195.20.87 timed out
2004-11-22 07:10:39 ident connection to 81.195.20.87 timed out
2004-11-22 07:10:51 H=ppp20-87.pppoe.mtu-net.ru (81.3.66.227)
[81.195.20.87]:46592 Warning: Qonnect-PROTECT-Warn: helo/ehlo problems
(helo_bareip)
f^@^@^@^C select distinct domain_name from   DOMAIN where  domain_name =
'port25.info' and    host_email  = 1 T-Warn: helo/ehlo problems
(helo_bareip)
f^@^@^@^C select distinct domain_name from   DOMAIN where  domain_name =
'port25.info' and    host_email  = 1 2004-11-22 07:10:51 failed to expand
"@:${lookup mysql{ select distinct domain_name from   DOMAIN where
domain_name = '${quote_mysql:$domain}' and    host_email  = 1 }{$value}}"
while checking a list: lookup of " select distinct domain_name from   DOMAIN
where  domain_name = 'port25.info' and    host_email  = 1 " gave DEFER:
MYSQL: query failed: Lost connection to MySQL server during query


Relevant portion of the helo acl...
  accept  condition  = ${if isip {$sender_helo_name} {true}{false}}
          set acl_c0 = helo_bareip
          set acl_c1 = \
              Improper HELO/EHLO: IP address without brackets. RFC
2821,\r\n\
              section 4.1.3: "[an address literal] uses four small
decimal\r\n\
              integers separated by dots and enclosed by brackets [...]"
          delay      = 5s


Relevant portion of the rcpt acl...
  warn    message        = X-Qonnect-PROTECT-Warn: helo/ehlo problems
($acl_c0)
          log_message    = Qonnect-PROTECT-Warn: helo/ehlo problems
($acl_c0)
          !authenticated = *
          condition      = ${if def:acl_c0 {true}{false}}