Hi Arnaud,
   I did not see an answer to this so; I think the info you need is
here http://jeremy.zawodny.com/blog/archives/000203.html and here
http://jeremy.zawodny.com/blog/archives/000697.html

But I think you want "skip-name-resolve" to be specified in my.cnf.

Ken

I have included the relevant section from Jeremeys blog:
___________________________________________________________________
1. Non-thread safe DNS Lookups

Certain operations are not thread-safe on FreeBSD. A fine example of
that is gethostbyname(), which MySQL calls to convert host names in to
IP addresses. Usually this happens for each new connection to the
server and whenever MySQL needs to contact another machine--typically
a replication slave connecting to its master.

Based on our testing, the only truly safe way to operate is to use
the --skip-name-resolve flag for starting mysqld AND specifying the IP
address of the master instead of the hostname. That virtually
eliminates the need for MySQL to call gethostbyname().

The symptom of this problem is that the mysqld will consume all the
available CPU time even when there are few (if any) queries running.
You can try and kill -6 the mysqld process and then run it thru gdb to
get a backtrace. You'll likely see something like this:

#0  0x829c94c in _thread_kern_sched_state_unlock () at
./cp/tinfo2.cc:300
#1  0x829c0e0 in _thread_kern_sched () at ./cp/tinfo2.cc:300
#2  0x829c787 in _thread_kern_sched_state () at ./cp/tinfo2.cc:300
#3  0x82c5fdc in kevent () at ./cp/tinfo2.cc:300
#4  0x82c5a4f in res_send () at ./cp/tinfo2.cc:300
#5  0x82a4308 in res_query () at ./cp/tinfo2.cc:300
#6  0x82a4737 in res_querydomain () at ./cp/tinfo2.cc:300
#7  0x82a44bb in res_search () at ./cp/tinfo2.cc:300
#8  0x82a9a00 in _gethostbydnsname () at ./cp/tinfo2.cc:300
#9  0x82a8739 in gethostbyname2 () at ./cp/tinfo2.cc:300
#10 0x82a86d4 in gethostbyname () at ./cp/tinfo2.cc:300
#11 0x8275fc4 in my_gethostbyname_r (
    name=0x1b5f79a8 "your_hostanme", result=0x9fa659b8,
    buffer=0x9fa651b8 "\032", buflen=2048, h_errnop=0x9fa651b0)
    at my_gethostbyname.c:108
#12 0x80d6fbd in mc_mysql_connect ()
#13 0x80d6b37 in mc_mysql_reconnect ()
#14 0x80d4506 in safe_reconnect ()
#15 0x80d3fb8 in handle_slave ()
#16 0x828ffa5 in _thread_start () at ./cp/tinfo2.cc:300
#17 0x0 in ?? ()
If you see that, get rid of DNS lookups.




----- Original Message ----- 
From: "Arnaud Pignard" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, January 16, 2004 7:06 PM
Subject: Re: Repeated 100% CPU problem in FreeBSD


> Hi !
>
> Anyone find a solution for this problem ?
>
> We have 2 mysql server with same problem. Happen like every 1-2
months.
>
> Regards,
>
>
> -- 
> Arnaud Pignard ([EMAIL PROTECTED])
> Frontier Online - Opérateur Internet
>
>
>
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]
>
>
>


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to