RE: Complete server lock
MySQL and DNS can be such a fun issue because it comes suddenly and leaves just as suddenly with --skip-name-resolve. For in-depth info on how MySQL uses DNS, and info about this potential DNS-related bug: http://codenode.com/mysql/dns -Daniel -Original Message- From: Ben Clewett [mailto:[EMAIL PROTECTED] Sent: Friday, July 29, 2005 8:59 AM To: JamesDR Cc: mysql@lists.mysql.com Subject: Re: Complete server lock JamesDR wrote: I noticed, on my Linux server, that MySQL makes a DNS lookup anyway. Even if the IP is used or not. It normally digs on the PTR record. I had all of my perms IP based, however, it still looked at the PTR record. At the time I hadn't set any up in my DNS server. After I added all the PTR records of the clients that were connecting to the server, it was fast again. ...Something to think about... James, I think you've found the problem. For the benefit of us novices, what is the PTR record? After which I can add this to my /etc/hosts, which should help. If there is anybody who knows how to build a DNS clean MySQL, I would be very interested in knowing. Regards, Ben Clewett. -- 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]
Complete server lock
Dear MySQL, Yesterday we had a complete lock on our MySQL 4.1.9. If I connected to it TCP, it would make the connection and hang. If I connected through the UNIX port, it would report no such file 'mysql.port'. If I 'kill' or used the stop, nothing would happen. Eventually I had to 'kill -9'. I don't think we lost any data fortunately. It had been suggested that our DNS failed prior to this event. I don't think MySQL uses DNS, but I am not entirely sure. Would any person know what may have caused this? If I get a state where a 'kill' will not cause MySQL to exit. Is there any other know way to ask MySQL to exit cleanly? Regards, Ben Clewett. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Complete server lock
Ben Clewett wrote: It had been suggested that our DNS failed prior to this event. I don't think MySQL uses DNS, but I am not entirely sure. If the db, user, etc. tables in the mysql system database (containing privileges, etc.) contain host names instead of IP-addresses I suspect it needs a DNS to resolve these... If I get a state where a 'kill' will not cause MySQL to exit. Is there any other know way to ask MySQL to exit cleanly? MySQL server was probably waiting for a bunch of DNS requests? Until a timeout occurs it will probably keep the connection waiting. This can cause a lot of connections to occur until you reach max_connections at which point it will not accept new connections anymore. Regards, Jigal. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Complete server lock
Jigal, Thanks. I can confirm that there were no domains used for our permissions. All IP based. Although this may have been the cause, I don't think it was in this case. I think as well that DNS timeouts are in the region of 20 seconds to 2 minutes. Would any person know if there is any other part of MySQL which uses DNS lookups? For instance, logging of some kind? Or any other reason a MySQL daemon would not respond to a kill? Thank for the ideas, Ben Clewett. Jigal van Hemert wrote: Ben Clewett wrote: It had been suggested that our DNS failed prior to this event. I don't think MySQL uses DNS, but I am not entirely sure. If the db, user, etc. tables in the mysql system database (containing privileges, etc.) contain host names instead of IP-addresses I suspect it needs a DNS to resolve these... If I get a state where a 'kill' will not cause MySQL to exit. Is there any other know way to ask MySQL to exit cleanly? MySQL server was probably waiting for a bunch of DNS requests? Until a timeout occurs it will probably keep the connection waiting. This can cause a lot of connections to occur until you reach max_connections at which point it will not accept new connections anymore. Regards, Jigal. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Complete server lock
Ben Clewett wrote: Jigal, Thanks. I can confirm that there were no domains used for our permissions. All IP based. Although this may have been the cause, I don't think it was in this case. I think as well that DNS timeouts are in the region of 20 seconds to 2 minutes. Would any person know if there is any other part of MySQL which uses DNS lookups? For instance, logging of some kind? Or any other reason a MySQL daemon would not respond to a kill? Thank for the ideas, Ben Clewett. Jigal van Hemert wrote: Ben Clewett wrote: It had been suggested that our DNS failed prior to this event. I don't think MySQL uses DNS, but I am not entirely sure. If the db, user, etc. tables in the mysql system database (containing privileges, etc.) contain host names instead of IP-addresses I suspect it needs a DNS to resolve these... If I get a state where a 'kill' will not cause MySQL to exit. Is there any other know way to ask MySQL to exit cleanly? MySQL server was probably waiting for a bunch of DNS requests? Until a timeout occurs it will probably keep the connection waiting. This can cause a lot of connections to occur until you reach max_connections at which point it will not accept new connections anymore. Regards, Jigal. I noticed, on my Linux server, that MySQL makes a DNS lookup anyway. Even if the IP is used or not. It normally digs on the PTR record. I had all of my perms IP based, however, it still looked at the PTR record. At the time I hadn't set any up in my DNS server. After I added all the PTR records of the clients that were connecting to the server, it was fast again. ...Something to think about... -- Thanks, James -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Complete server lock
JamesDR wrote: I noticed, on my Linux server, that MySQL makes a DNS lookup anyway. Even if the IP is used or not. It normally digs on the PTR record. I had all of my perms IP based, however, it still looked at the PTR record. At the time I hadn't set any up in my DNS server. After I added all the PTR records of the clients that were connecting to the server, it was fast again. ...Something to think about... James, I think you've found the problem. For the benefit of us novices, what is the PTR record? After which I can add this to my /etc/hosts, which should help. If there is anybody who knows how to build a DNS clean MySQL, I would be very interested in knowing. Regards, Ben Clewett. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Complete server lock
Ben Clewett wrote: JamesDR wrote: I noticed, on my Linux server, that MySQL makes a DNS lookup anyway. Even if the IP is used or not. It normally digs on the PTR record. I had all of my perms IP based, however, it still looked at the PTR record. At the time I hadn't set any up in my DNS server. After I added all the PTR records of the clients that were connecting to the server, it was fast again. ...Something to think about... James, I think you've found the problem. For the benefit of us novices, what is the PTR record? After which I can add this to my /etc/hosts, which should help. If there is anybody who knows how to build a DNS clean MySQL, I would be very interested in knowing. Regards, Ben Clewett. From the manual http://dev.mysql.com/doc/mysql/en/dns.html, You can disable DNS hostname lookups by starting mysqld with the --skip-name-resolve option. However, in this case, you can use only IP numbers in the MySQL grant tables. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Complete server lock
Michael, Thank for the reference. This is useful. Ben. Michael Stassen wrote: Ben Clewett wrote: JamesDR wrote: I noticed, on my Linux server, that MySQL makes a DNS lookup anyway. Even if the IP is used or not. It normally digs on the PTR record. I had all of my perms IP based, however, it still looked at the PTR record. At the time I hadn't set any up in my DNS server. After I added all the PTR records of the clients that were connecting to the server, it was fast again. ...Something to think about... James, I think you've found the problem. For the benefit of us novices, what is the PTR record? After which I can add this to my /etc/hosts, which should help. If there is anybody who knows how to build a DNS clean MySQL, I would be very interested in knowing. Regards, Ben Clewett. From the manual http://dev.mysql.com/doc/mysql/en/dns.html, You can disable DNS hostname lookups by starting mysqld with the --skip-name-resolve option. However, in this case, you can use only IP numbers in the MySQL grant tables. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]