Skip to content

[BUG] Intermittent ConcurrentModificationException using getMergedConnectorMessage #92

Description

@sbraconnier

Describe the bug
I personally experienced intermittent ConcurrentModificationException on heavy loaded channel. There is already some issues about this on the NextGen repo (see ConcurrentModificationException in global post processor and ConcurrentModificationException when using JS Writer).

To Reproduce
It's hard to reproduce, but you can visit the provided mirth issues for more details.

Expected behavior
Message.getMergedConnectorMessage should be thread safe.

Actual behavior
From time to time, a ConcurrentModificationException occurs.

Screenshots
NA

Environment (please complete the following information):
NA

Workaround(s)
There is no workaround.

Additional context
I'm is-simon now with my personnal github user (not working at "is" anymore).

I would be happy to work on this one. Should be easy enough...

Activity

  1. added 2 commits that reference this issue on Jul 19, 2025
    0fc1269
    e7148c5
  2. tonygermano commented on Feb 6, 2026

    @tonygermano
    Member

    @sbraconnier Are you able to reproduce this error and get a fresh stack trace? If so, can you share the mirth/oie version you were running when receiving the error as well as details about how the channel is configured? I am especially interested in destination queue settings and if there is channelMap or responseMap modification in the javascript transformer, response transformer, or post-processor.

  3. sbraconnier commented on Feb 6, 2026

    @sbraconnier
    ContributorAuthor

    Well, I don't work anymore for the company where I encountered this problem, so I don't have access to this channel anymore. I tried many times to reproduce the issue locally but never succeeded.

    My personal experience was with a Mirth 4.1.0 instance (Temurin 17), in a channel having 20+ destinations, processing multiple messages per second, 24/7. Many destinations had complex transformers (multiple steps, hundred (if not thousand) of JavaScript code lines). I remember that I had a baby heart attack while browsing the code and configuration. Many things should have been done differently... A lot of copy/paste or "clone destination" stuff that probably should have been removed....

    I also asked ChatGPT to help me reproduce the issue (starting threads in Transformers) but yet again, no luck...

  4. tonygermano commented on Feb 10, 2026

    @tonygermano
    Member

    @sbraconnier do you agree with closing this issue and #93 for now? I'll gladly reopen the issue if someone is encountering the error with current examples.

  5. sbraconnier commented on Feb 11, 2026

    @sbraconnier
    ContributorAuthor

    @tonygermano I guess it makes sense. I doubt tho that we'll find something better than the retry algorithm (if someone provides a new stack trace). The problem is still there but it's not bugging me anymore (for now).

  6. tonygermano commented on Jun 28, 2026

    @tonygermano
    Member

    Closing per discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions