[SERVER-39932] SessionRuntimeInfo memory is not being released Created: 01/Mar/19 Updated: 29/Oct/23 Resolved: 21/Mar/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 3.6.11 |
| Fix Version/s: | 3.6.12 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Misha Tyulenev | Assignee: | Misha Tyulenev |
| Resolution: | Fixed | Votes: | 4 |
| Labels: | bkp | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Sprint: | Sharding 2019-03-11, Sharding 2019-03-25 | ||||||||
| Participants: | |||||||||
| Case: | (copied to CRM) | ||||||||
| Description |
|
The issue manifests as a steady increase in memory use from the _getOrCreateSessionRuntimeInfo. The code in 3.6 shows that the memory is not released. |
| Comments |
| Comment by Githook User [ 20/Mar/19 ] |
|
Author: {'email': 'misha@mongodb.com', 'name': 'Misha Tyulenev', 'username': 'mikety'}Message: |
| Comment by Kaloian Manassiev [ 05/Mar/19 ] |
|
Each SessionRuntimeInfo from the SessionsCatalog corresponds to a session with an active transaction on it. These entries get purged when entries get deleted from config.transactions (which is done by the sessions reaper). Is it possible that the sessions reaper is not deleting entries from config.transactions? Another possibility that I am thinking of is that if an operation checks-out a session, but doesn't perform a retryable write (or it doesn't commit), there will not be an entry in config.transactions for the reaper to clean-up and therefore that entry will remain in memory forever, even if the session gets abandoned without ever having done a write. |
| Comment by Misha Tyulenev [ 04/Mar/19 ] |
|
kelsey.schubert while the catalog sessions code changed since 3.6 the other releases are also affected with the same issue. |
| Comment by Misha Tyulenev [ 04/Mar/19 ] |
|
josef.ahmad primary step down should release the memory, so the workaround I can think if is to force election periodically |
| Comment by Kelsey Schubert [ 01/Mar/19 ] |
|
misha.tyulenev, could you confirm that only MongoDB 3.6 is affected? |