Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Feb 2006 14:40:18 -0800
From:      Michael Jeung <mjeung@cisdata.net>
To:        freebsd-questions@freebsd.org
Subject:   MySQL Connection Problems
Message-ID:  <198B068F-868F-4666-9102-581C80C18A92@cisdata.net>

next in thread | raw e-mail | index | archive | help

--Apple-Mail-65-156345104
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	delsp=yes;
	format=flowed

Hello all,

I'm running into a intermittent and very annoying problem with all of  
my servers. I'm currently running FreeBSD 4.11, exim-4.51-0, and  
mySQL 4.1.13. My exim config is setup to have exim do a mySQL lookup  
in order to determine whether a given user's e-mail is hosted by our  
e-mail servers.

Periodically, Exim throws the following error into its panic log:
Feb 9 13:24:51 mx_server_1 exim[69953]: 2006-02-09 13:24:51 failed to  
expand "${lookup mysql {select distinct domain from email_table where  
domain='$domain'}{$value}}" while checking a list: lookup of "select  
distinct domain from email_table where domain='bob.com'" gave DEFER:  
MYSQL connection failed: Can't connect to MySQL server on  
'127.0.0.1' (61)
(where bob.com is one of our customer's domains that we host.)

This has been happening for months, and I'm trying to get rid of  
these errors. The come in bursts - in a single second, I could get as  
many as 30 to 40 of these messages.

Now, I've taken a few different steps to track this down, but the  
problem is very elusive and hard to replicate. The mySQL error logs  
are unhelpful. I'm sure that my mySQL server isn't running out of  
connections, because if it was, I would receive a "too many  
connection" error message. (I deliberately lowered the max number of  
mySQL connections to test this.)

I'm wondering if there's a system level limit that I'm running into  
that would be independant of exim or mySQL's configuration. I'm a  
little hazy in this area, but I would be talking about some sysctl  
variable, a ulimit on open sockets, or something to that effect.

I'm rather stumped on this issue, so if anyone has any suggestions or  
hints on what might be causing this error or where I might start  
looking to find the root cause of the problem, I would be very grateful.

Thanks,
Michael Jeung


--Apple-Mail-65-156345104--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?198B068F-868F-4666-9102-581C80C18A92>