[MXS-1723] Delayed connection creation Created: 2018-03-20 Updated: 2019-04-29 Resolved: 2019-04-29 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | readwritesplit |
| Affects Version/s: | 2.2.3 |
| Fix Version/s: | 2.4.0 |
| Type: | New Feature | Priority: | Major |
| Reporter: | sava | Assignee: | markus makela |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Environment: |
CentOS 7 |
||
| Issue Links: |
|
||||||||||||
| Description |
Original descriptionThe readwritesprit router have specification called "Routing to every session backend" in this page. https://mariadb.com/kb/en/mariadb-enterprise/mariadb-maxscale-22-readwritesplit/ For example, SET NAMES 'utf8' is always executed on the master server even if there is no write in the following statements. So, a slave server with a high load could make the master server in the error state of "Too many connections". I want a function that does not execute the session commands until it needs it. Implementation NotesThis ties in with the improved storage of session commands so that the execution of session commands on the master can be postponed until a master connection is needed. |
| Comments |
| Comment by markus makela [ 2018-03-20 ] |
|
The master connection is created as soon as the client connection is made. Please correct me if I am wrong but here's what I think would solve your problem:
|
| Comment by sava [ 2018-03-20 ] |
|
Thank you for your comment. I couldn't understand difference of 2 and 3, but I think 3 is what I need. When there is no writing, any connection is not made to the master. This can solve the problem. |
| Comment by markus makela [ 2018-03-20 ] |
|
OK, I'll go ahead and update the issue title to better describe the requested feature. |
| Comment by markus makela [ 2019-04-29 ] |
|
Added lazy_connect to 2.4.0. |