Bug #6848 max_connections
Submitted: 26 Nov 2004 12:55 Modified: 26 Dec 2004 15:56
Reporter: ruben cao Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:4.0.18 OS:Linux (linux debian)
Assigned to: CPU Architecture:Any

[26 Nov 2004 12:55] ruben cao
Description:
With mysql 4.x you added a max_connections parameter to User table. I tried to use it with some Mysql 4.xx versions (as 4.0.18) and it hasn't the desired behavior.

Problem is that if you limit an user to xx max_connections, when that user reaches that max_connections, a too many users message will be persistent for that user since then and no more connections will be allowed even if you do a "Show processlist" and that user is not listed!

How to repeat:
You just have to configure an user in mysql with a max_connections limit in user table. Then, reach the max_connections limit with that user. You will see that once connections are reached, you'll don't be able of connect with that user more (even if your connections of before are closed) until you restart mysql.

Suggested fix:
I think you should check it to don't allow more connections when limit is reached, but still allow xx max_connections number to that user always!. For example, if you have 40 connections accesing with an user and 30 is the limit, you should allow to the first 30 connections connect to the database and deny only 10 connections.
[26 Nov 2004 12:58] ruben cao
changed category for this bug.
[26 Nov 2004 15:56] MySQL Verification Team
Hi!

First of all, this option has to be used only with GRANT statement, and not directly by changing user table.

Next, it's functionality is described in the manual.
[14 Feb 2005 22:54] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".