Re: [Exim] Odd problem with SQL and reconnecting.

Top Page
Delete this message
Reply to this message
Author: William Thompson
Date:  
To: Philip Hazel
CC: exim-users
Subject: Re: [Exim] Odd problem with SQL and reconnecting.
> > 3935 MYSQL new connection: host=cd port=3306 socket=NULL database=NULL user=exim
> >  3935 MYSQL connection failed: Unknown MySQL Server Host 'cd' (4)
>                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> This bit of the error message is generated by a call to mysql_error(),
> so it is MySQL that is generating this text. All Exim has done is to
> call mysql_real_connect() and print the error when it failed.

>
> > It appears that on 2nd connections, exim or the mysql lookup is not using
> > the DNS to get the IP address.
>
> Exim passes the server name to MySQL. It appears to be doing that
> correctly. You'll have to dig in MySQL to see what that error message
> actually means.


I can understand that, but what I can't understand is why it connects the
first time w/o problems, but not the 2nd time. Seems to be DNS related
because if it's in /etc/hosts, it doesn't have a problem.

How hard would it be to have exim not close the sql connection until it
quits? I realize the source would have to be modified as I've never seen an
option for this.