Create a single ActiveMQ session per connection, to prevent OOM errors#205
Open
stevehillman wants to merge 8 commits intoInternet2:GROUPER_2_6_BRANCHfrom
Open
Create a single ActiveMQ session per connection, to prevent OOM errors#205stevehillman wants to merge 8 commits intoInternet2:GROUPER_2_6_BRANCHfrom
stevehillman wants to merge 8 commits intoInternet2:GROUPER_2_6_BRANCHfrom
Conversation
Each created Session spawns a thread to handle message transmission. Prior to this change, each change resulted in a new thread being created. If the ChangeLog had a large number of pending changes (10s of thousands), memory starvation occurred. This change serializes message transmission
…into GROUPER_2_6_BRANCH
- The previous behaviour used a separate session in the ActiveMQ client library for each message being sent. Each session spawns two threads. If a Change Log update involved too many changes, memory exhaustion could occur. The old behaviour can be restored by setting grouper.messaging.system.activeMqMessaging.useSharedSession = false in grouper.client.properties
…into GROUPER_2_6_BRANCH
…into GROUPER_2_6_BRANCH
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR changes the ActiveMQ ChangeLog processor to only create one ActiveMQ session per Connection, rather than one per message. Each AMQ Session starts a new thread, and the "one per message" model was causing OOM errors when large changes were processed.