[MXS-122] Persistent Connection to backend server Created: 2015-05-05 Updated: 2015-08-28 Resolved: 2015-08-28 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | Core |
| Affects Version/s: | None |
| Fix Version/s: | 1.3.0 |
| Type: | New Feature | Priority: | Major |
| Reporter: | Dipti Joshi (Inactive) | Assignee: | martin brampton (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Epic Link: | MaxScale 1.3 | ||||||||
| Description |
|
Provide a persistent connection to database per client per user connection Have a configuration limit on the maximum number of connections that can be made to a backend server for each server |
| Comments |
| Comment by Dipti Joshi (Inactive) [ 2015-06-02 ] |
|
martin brampton, Also see |
| Comment by Dipti Joshi (Inactive) [ 2015-06-03 ] |
|
martin brampton Please change the status of this task to "In Progress" since you are actively working on it. |
| Comment by Dipti Joshi (Inactive) [ 2015-06-09 ] |
|
martin brampton Massimiliano Pinto Please list the new configuration parameters and their behaviors here. Is the parameter per server, per service or per user ? |
| Comment by martin brampton (Inactive) [ 2015-06-09 ] |
|
There are two new configuration parameters, both of which belong in the server sections. One is "persistpoolmax" which determines the maximum number of connection DCBs that will be kept in the persistent pool. The default is 0 so that if nothing is done in the MaxScale configuration there will be no persistent connections. The other new parameter is "persistmaxtime" which is the maximum time in seconds that a persistent connection can remain in the pool and still be reused. The "persistmaxtime" should be set to a shorter time than the connection timeout configured in the backend server. The maxadmin capabilities have been extended to support persistent connections. Showing servers now gives a figure for the number of DCBs that are in the persistent pool, waiting for reuse. There is a new command "show persistent ***" where the parameter is the name of a server. All DCBs that are in the persistent pool for the specified server are listed. |
| Comment by Dipti Joshi (Inactive) [ 2015-06-10 ] |
|
martin brampton Can we put link to list the unit test case scenarios for this ? |
| Comment by Massimiliano Pinto (Inactive) [ 2015-06-10 ] |
|
Found issues with SysBench 0.4.12 when persistent connection is enabled in a server section: second run results in: [root@maxscale-02 build]# sysbench --test=oltp --mysql-host=127.0.0.1 --mysql-port=4506 --mysql-user=massi --mysql-password=massi --mysql-db=sbtest --max-requests=100 --num-threads=40 --db-driver=mysql --oltp-read-only run ALERT: Error: failed to determine table 'sbtest' type! With mysqlslap no issues. Found sometimes debug assertion abort, that causes maxscale failure, when a connection has expired |
| Comment by Massimiliano Pinto (Inactive) [ 2015-06-11 ] |
|
Today's new code is being tested with sysbench 0.5.3 with include test: /usr/share/doc/sysbench/tests/db/oltp.lua no issues found. Code is stable right now even when removing expired connections (at a session create or when a "quit" is received. Continue working. |
| Comment by Massimiliano Pinto (Inactive) [ 2015-06-11 ] |
|
some sporadic crashes found with CTRL-C in running mysqlslap and sysbench tests. |
| Comment by Dipti Joshi (Inactive) [ 2015-06-16 ] |
|
martin brampton & Massimiliano Pinto (1) To understand the issue - we are seeing the crash when client disconnects with CTRL-C - Is that correct ? (2) Are we stable if the database server goes down ? (3) Do we have list of test cases scenarios are we testing the feature against ? |
| Comment by martin brampton (Inactive) [ 2015-06-16 ] |
|
1) No, that was fixed some while ago |
| Comment by Dipti Joshi (Inactive) [ 2015-06-16 ] |
|
Thanks for answers Markus has done the same for other features in 1.2 - for example : This way we know what scenarios we have already addressed and what are left. It also helps Timofey for better test case coverage. Thanks ! |
| Comment by Dipti Joshi (Inactive) [ 2015-06-18 ] |
|
martin brampton Any update on the test case list ? Thanks, |
| Comment by martin brampton (Inactive) [ 2015-06-19 ] |
|
a) There have only been 2 working hours for me since you raised the question of test cases, so no. |
| Comment by martin brampton (Inactive) [ 2015-06-24 ] |
|
Notes on testing can be found at https://docs.google.com/document/d/1sIYcfa8qQMUJ_zDBsmDO4AhC2PmW6WYwxQp64-xoBDk/edit |
| Comment by martin brampton (Inactive) [ 2015-06-30 ] |
|
No known faults for some while now. |
| Comment by Dipti Joshi (Inactive) [ 2015-08-25 ] |
|
martin brampton Is this task complete now - can it be closed ? |
| Comment by martin brampton (Inactive) [ 2015-08-28 ] |
|
Additional work on persistent connections is included in |
| Comment by martin brampton (Inactive) [ 2015-08-28 ] |
|
Appears to be robust, additional changes to further enhance reliability in |