Re: create threads rate

2004-01-27 Thread Arnaud Pignard
Hello,

Do you have add in your my.cnf skip-name-resolve ?
If not maybe the problem come from here.
Also upgrade to 4.0.17 will fix some bug on FreeBSD if i remenber right 
(check maybe changelog)

At 11:42 26/01/2004, Varshavchick Alexander wrote:
Hi,

I have a 4.0.7 mysql server which services requests from several virtual
web sites. Most of the times all works well but periodically the mysql
server suddently gets loaded to impossibly high values - load average up
to several hundred. During such periods the server sleeps and is not
responding. I suspect that the cause of this can be in a spontaneous very
high rate of new connections when many new threads are being created and
running, and it is too much for the server. The question is if there is
some mechanism in mysql which can control the rate in which the new
threads are created, something similar to MAX_SPAWN_RATE option in apache
web server daemon, or something of the sort?
Server mysql 4.0.7 with linux threads runs under FreeBSD 4.6.2.

Thanks


Alexander Varshavchick, Metrocom Joint Stock Company
Phone: (812)118-3322, 118-3115(fax)
--
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]


Re: Repeated 100% CPU problem in FreeBSD

2004-01-20 Thread Arnaud Pignard
Hi Ken,

I have compile MySQL with this param : -D SKIP_DNS_CHECK

As i have upgrade with portupgrade and forget to repass param, i have put 
dns off on my.cnf

I will check if make -D SKIP_DNS_CHECK work. If yes, the problem is not dns 
resolve.
I hope it's bad param pass to makefile :)

Thanks for answer.

Best Regards,

At 16:59 20/01/2004, you wrote:
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]


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


Re: Repeated 100% CPU problem in FreeBSD

2004-01-16 Thread Arnaud Pignard
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]