Subject: Re: Mysql Blocking connections
To: matthew sporleder <msporleder@gmail.com>
From: Tim Wojtulewicz <timwoj@ieee.org>
List: netbsd-users
Date: 04/18/2005 19:04:04
Never mind.  I pitched my pkgsrc install this morning, rebuilt the  
distribution, and reinstalled everything in pkgsrc.  Everything seems  
to work again now.  It must have been some carry-over from the old  
stuff, especially since the pth package was still installed.

Tim

On Apr 18, 2005, at 11:53 AM, matthew sporleder wrote:

> I'm just not seeing the problem.  I did three connections from
> localhost without an issue.  This is mysql straight from pkgsrc.  Do
> you see anything in your error log? (/var/mysql/hostname.err)
>
> NetBSD fester 2.0.1 NetBSD 2.0.1 (GENERIC) #3: Tue Feb 15 11:16:00 UTC
> 2005  msporled@fester:/usr/obj/sys/arch/i386/compile/GENERIC i386
>
> bash-2.05b$ mysql -u root -p
> Enter password:
> Welcome to the MySQL monitor.  Commands end with ; or \g.
> Your MySQL connection id is 7 to server version: 4.1.10a
>
> Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
>
> mysql> show processlist;
> +----+------+-----------+------+---------+------+------- 
> +------------------+
> | Id | User | Host      | db   | Command | Time | State |  
> Info             |
> +----+------+-----------+------+---------+------+------- 
> +------------------+
> |  4 | root | localhost | NULL | Sleep   |   17 |       |  
> NULL             |
> |  6 | root | localhost | NULL | Sleep   |   14 |       |  
> NULL             |
> |  7 | root | localhost | NULL | Query   |    0 | NULL  | show  
> processlist |
> +----+------+-----------+------+---------+------+------- 
> +------------------+
> 3 rows in set (0.00 sec)
>
>
> On 4/18/05, timwoj@ieee.org <timwoj@ieee.org> wrote:
>
>> I'm having an issue with MySQL 4.1.11 on Netbsd 2.0.2.  I had MySQL
>> running 4.0x running under NetBSD 1.6.2, and when I upgraded to  
>> the new
>> NetBSD, I went ahead and upgraded mysql as well.  For some reason,
>> mysql will only allow one connection at a time and blocks all other
>> connections.  New connections don't get a "Too Many Connections"  
>> error,
>> which means that setting max_connections in my.cnf doesn't help.  The
>> new connections just hang forever until the first connection closes.
>> Running show processlist via the command list gives:
>>
>> mysql> show processlist;
>> +----+------+-----------+------+---------+------+-------
>> +------------------+
>> | Id | User | Host      | db   | Command | Time | State | Info
>>     |
>> +----+------+-----------+------+---------+------+-------
>> +------------------+
>> |  1 | root | localhost | NULL | Query   |    0 | NULL  | show
>> processlist |
>> +----+------+-----------+------+---------+------+-------
>> +------------------+
>> 1 row in set (0.00 sec)
>>
>> Note that that is my one connection.  Any other connections made  
>> while
>> I'm in the command-line tool are blocked.  My my.cnf looks like this:
>>
>> # The following options will be passed to all MySQL clients
>> [client]
>> port            = 3306
>> socket          = /tmp/mysql.sock
>>
>> # Here follows entries for some specific programs
>>
>> # The MySQL server
>> [mysqld]
>> port            = 3306
>> socket          = /tmp/mysql.sock
>> skip-external-locking
>> key_buffer = 256M
>> max_allowed_packet = 1M
>> table_cache = 256
>> sort_buffer_size = 1M
>> read_buffer_size = 1M
>> read_rnd_buffer_size = 4M
>> myisam_sort_buffer_size = 64M
>> thread_cache_size = 8
>> query_cache_size= 16M
>> # Try number of CPU's*2 for thread_concurrency
>> thread_concurrency = 8
>> max_connections=500
>>
>> # required unique id between 1 and 2^32 - 1
>> # defaults to 1 if master-host is not set
>> # but will not function as a master if omitted
>> server-id       = 1
>>
>> [mysqldump]
>> quick
>> max_allowed_packet = 16M
>>
>> [mysql]
>> no-auto-rehash
>> # Remove the next comment character if you are not familiar with SQL
>> #safe-updates
>>
>> [isamchk]
>> key_buffer = 128M
>> sort_buffer_size = 128M
>> read_buffer = 2M
>> write_buffer = 2M
>>
>> [myisamchk]
>> key_buffer = 128M
>> sort_buffer_size = 128M
>> read_buffer = 2M
>> write_buffer = 2M
>>
>> [mysqlhotcopy]
>> interactive-timeout
>>
>> The config is based off of netbsd's default my-huge.cnf config,  
>> just a
>> couple things modified.  If anyone has any ideas why this thing is
>> blocking connections, that'd be great.  I've been running around
>> through mysql's documentation and mailing list archives, and googling
>> for a week now, and I'm no closer to fixing it.  Thanks.
>>
>> Note: This was cross-posted to the mysql-general list.  Since  
>> then, I've
>> downgraded to mysql 4.0.24, and had the same results.  I'm about  
>> to toss
>> my entire pkgsrc and start over, but I'd really rather not if I  
>> don't have
>> to.
>>
>> Tim
>>
>>
>>
>
>
> -- 
> _Matt
>