Hi, Marc, On Jul 12, Marc wrote: > > > > > > Is it possible that someone of mariadb checks what happens when > > > the max_user_connections is exhausted, because to me it looks like > > > further requests are handled as being 'max_connections' which > > > defeats the purpose of max_user_connections > > > > No, further requests are rejected with an error: > > > > https://github.com/MariaDB/server/blob/10.5/mysql-test/main/user_limits.result#L92 > > Say we have db usera, userb, userc all on the same clienthost ip. > > I suspect that if usera exhausts its max_user_connections, continued > requests are not being counted any more under usera but under > clienthost. > At some point max_connections will be reached resulting in userb and > userc failure. (It looks like this is what I am experiencing > currenlty)
Not quite. max_user_connections limit is enforced after successful authentication - that's when the server knows the user name. max_connections is enforced as soon as the client connects. So yes, even when usera has reached max_user_connections limit, it can keep trying to connect and exhaust max_connections too, especially if it'll delay sending authentication packets. > This can be mitigated by not counting these failed connections of > usera to the global max_connections (or closing them more quickly?). > This way you will probably safeguard the operation of userb and userc > from the same clienthost ip. The server cannot close connection in the middle of authentication, it could be your valid userb or userc. Regards, Sergei Chief Architect, MariaDB Server and [email protected] _______________________________________________ discuss mailing list -- [email protected] To unsubscribe send an email to [email protected]
