[MDEV-17714] extra_port and extra_max_connections doc pages in the wrong section (thread pool) Created: 2018-11-14  Updated: 2022-06-10  Resolved: 2019-04-23

Status: Closed
Project: MariaDB Server
Component/s: Documentation - Support
Affects Version/s: N/A
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Claudio Nanni Assignee: Kenneth Dyer (Inactive)
Resolution: Fixed Votes: 0
Labels: None


 Description   

Documentation about

extra_port

and

extra_max_connections

are in the Thread Pool section,
this is misleading because the variables have nothing to do with thread pool:

https://mariadb.com/kb/en/library/thread-pool-system-and-status-variables/#extra_max_connections

See also: https://jira.percona.com/browse/PS-2283



 Comments   
Comment by Vladislav Vaintroub [ 2018-11-14 ]

It has to do something with threadpool, at least historically.
It is about providing an alternative scheduler to the threadpool, in unlikely case it becomes blocked (which probably only happens when threadpool_max_threads was configured too low).

It happens to work without threadpool, but what would it be good for, then?

Comment by Claudio Nanni [ 2018-11-14 ]

This feature is very useful when an instance hits "too many connections" and you need to have some monitoring system still be able to report the status of the instance.
By default only one extra administrative connection is allowed but that could not be enough, and sometimes I've seen not even root being able to connect when "Too many connections" happened.
If you have the chance to have 5-10 extra connections for administrative purposes you can better monitor and manage the instance.
One recent problem I've seen is MaxScale not being able to monitor the instance because of this.
MaxScale could be configured so the monitor connects to that extra port so to never be cut out. The feature for this has been requested(https://jira.mariadb.org/browse/MXS-2167)
Only admin tools should know and connect to that port, if needed a firewall can be setup to disallow connections from the users or apps.

Comment by Vladislav Vaintroub [ 2018-11-14 ]

Well, claudio.nanni, I like your inventive interpretation. I'm just telling was it was for, originally.
You expand "one administrative connection" to N administrative connections, but in fact, you could just request his feature without extra port

Comment by Kenneth Dyer (Inactive) [ 2019-03-07 ]

I agree with wlad. The pages on which we document system variables should follow the context in which they were added or are maintained. These two are part of Thread Pool, so they should stay on that page.

That said, I think claudio.nanni's example is valuable. So, I rewrote the Troubleshooting Blocking Situations section to specifically call out using the variables to safeguard MaxScale monitoring. Do you think we should add this concept to the general MaxScale setup or to the specific MaxScale setup for enterprise/platform?

https://mariadb.com/kb/en/library/thread-pool-in-mariadb/#troubleshooting-blocking-situations

Comment by Geoff Montee (Inactive) [ 2019-04-10 ]

https://mariadb.com/kb/en/library/thread-pool-in-mariadb/#configuring-the-extra-port

https://mariadb.com/kb/en/library/thread-pool-in-mariadb/#fixing-a-blocked-thread-pool

Comment by Jacob Moorman (Inactive) [ 2019-04-12 ]

Kenneth: Please review Geoff's edits

Comment by Hartmut Holzgraefe [ 2022-06-10 ]

I was always under the impression that having the extra_port was only possible with pool-of-threads and not with one-thread-per-connection

Only today I learned that this actually works just fine with one-thread-per-connection, too, and so is a more reliable way to deal with "max_connections exceeded" than the classic "one connection reserved for SUPER".

Or at least on the 10.8 instance I tested on it worked fine, has this actually always been the case, or was this only added in later releases?

Comment by Hartmut Holzgraefe [ 2022-06-10 ]

Tested with 10.0 now, and found it working just fine there, too.

So all these years I could have recommended this to customers who ran into "Too many connections" problems when exceeding max_connections due to high load, locking, or disk full situations and for whom the "one connection reserved for SUPER" did not work out, but never did as I was under the impression that it was a pool-of-threads-only thing.

Generated at Thu Feb 08 08:38:33 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.