Bug #32066 | max_connections may be changed online | ||
---|---|---|---|
Submitted: | 2 Nov 2007 22:33 | Modified: | 7 Nov 2007 12:17 |
Reporter: | Grigory Rubtsov | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Documentation | Severity: | S3 (Non-critical) |
Version: | all | OS: | Any |
Assigned to: | Jon Stephens | CPU Architecture: | Any |
Tags: | max_connections, too many connections |
[2 Nov 2007 22:33]
Grigory Rubtsov
[3 Nov 2007 11:56]
Jon Stephens
Reviewer: Please verify that: 1. The new number of connections actually takes effect without restarting the server. 2. That the observed behaviour is expected, and not a server bug. I've changed the category to Server pending the outcome.
[3 Nov 2007 12:38]
Grigory Rubtsov
mysql> select version(); +-----------+ | version() | +-----------+ | 5.0.22 | +-----------+ mysql> select @@global.max_connections; +--------------------------+ | @@global.max_connections | +--------------------------+ | 100 | +--------------------------+ 1 row in set (0.01 sec) mysql> set @@global.max_connections=2; Query OK, 0 rows affected (0.00 sec) [rgbeast@elf ~]$ mysql [rgbeast@elf ~]$ mysql mysql> show processlist; +----+------+-----------+------+---------+------+-------+------------------+ | Id | User | Host | db | Command | Time | State | Info | +----+------+-----------+------+---------+------+-------+------------------+ | 2 | root | localhost | NULL | Query | 0 | NULL | show processlist | | 3 | root | localhost | NULL | Sleep | 36 | NULL | NULL | | 4 | root | localhost | NULL | Sleep | 28 | NULL | NULL | +----+------+-----------+------+---------+------+-------+------------------+ 3 rows in set (0.00 sec) [rgbeast@elf ~]$ mysql ERROR 1040 (00000): Too many connections mysql> set @@global.max_connections=3; Query OK, 0 rows affected (0.00 sec) [rgbeast@elf ~]$ mysql mysql> show processlist; +----+------+-----------+------+---------+------+-------+------------------+ | Id | User | Host | db | Command | Time | State | Info | +----+------+-----------+------+---------+------+-------+------------------+ | 2 | root | localhost | NULL | Query | 0 | NULL | show processlist | | 3 | root | localhost | NULL | Sleep | 49 | NULL | NULL | | 4 | root | localhost | NULL | Sleep | 41 | NULL | NULL | | 5 | root | localhost | NULL | Sleep | 4 | NULL | NULL | +----+------+-----------+------+---------+------+-------+------------------+ 4 rows in set (0.00 sec) [rgbeast@elf ~]$ mysql ERROR 1040 (00000): Too many connections The behavior is like expected (one thing is that is allows max_connections+1 connections)
[6 Nov 2007 17:28]
Valeriy Kravchuk
Other manual page, http://dev.mysql.com/doc/refman/5.1/en/dynamic-system-variables.html, clearly states that max_connection is dynamic and global system variable. So, this is definitely a reasonable documentation request in any case.
[7 Nov 2007 12:17]
Jon Stephens
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.