Subject: Re: Mysql Blocking connections
To: timwoj@ieee.org <timwoj@ieee.org>
From: matthew sporleder <msporleder@gmail.com>
List: netbsd-users
Date: 04/18/2005 14:53:12
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:=20
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:
>=20
> 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)
>=20
> 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:
>=20
> # The following options will be passed to all MySQL clients
> [client]
> port =3D 3306
> socket =3D /tmp/mysql.sock
>=20
> # Here follows entries for some specific programs
>=20
> # The MySQL server
> [mysqld]
> port =3D 3306
> socket =3D /tmp/mysql.sock
> skip-external-locking
> key_buffer =3D 256M
> max_allowed_packet =3D 1M
> table_cache =3D 256
> sort_buffer_size =3D 1M
> read_buffer_size =3D 1M
> read_rnd_buffer_size =3D 4M
> myisam_sort_buffer_size =3D 64M
> thread_cache_size =3D 8
> query_cache_size=3D 16M
> # Try number of CPU's*2 for thread_concurrency
> thread_concurrency =3D 8
> max_connections=3D500
>=20
> # 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 =3D 1
>=20
> [mysqldump]
> quick
> max_allowed_packet =3D 16M
>=20
> [mysql]
> no-auto-rehash
> # Remove the next comment character if you are not familiar with SQL
> #safe-updates
>=20
> [isamchk]
> key_buffer =3D 128M
> sort_buffer_size =3D 128M
> read_buffer =3D 2M
> write_buffer =3D 2M
>=20
> [myisamchk]
> key_buffer =3D 128M
> sort_buffer_size =3D 128M
> read_buffer =3D 2M
> write_buffer =3D 2M
>=20
> [mysqlhotcopy]
> interactive-timeout
>=20
> 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.
>=20
> 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 hav=
e
> to.
>=20
> Tim
>=20
>=20
--=20
_Matt