Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【BUG】Connect runtime out of memory #542

Open
VictoryAnn opened this issue Oct 24, 2024 · 0 comments
Open

【BUG】Connect runtime out of memory #542

VictoryAnn opened this issue Oct 24, 2024 · 0 comments

Comments

@VictoryAnn
Copy link

VictoryAnn commented Oct 24, 2024

BUG REPORT

  1. Please describe the issue you observed:
  • What did you do (The steps to reproduce)?

  • What is expected to see?
    task status is RUNNING

  • What did you see instead?
    task status is FAILED, and reason is OutOfMemory.

  1. Please tell us about your environment:

  2. Other information (e.g. detailed explanation, logs, related issues, suggestions on how to fix, etc):
    a. run jmap -heap 16 found memory top 1 is org.apache.rocketmq.connect.runtime.stats.ConnectStatsService.
    image
    b. use arthas watch sourceTaskTimesList and sinkTaskTimesList
    image
    image

SOLUTION:

    private void sampling() {
        this.lockSampling.lock();
        try {
            this.sourceTaskTimesList.add(new CallSnapshot(System.currentTimeMillis(), sourceTaskTimesTotal()));
            if (this.sourceTaskTimesList.size() > (MAX_RECORDS_OF_SAMPLING + 1)) {
                this.sourceTaskTimesList.removeFirst();
            }
            // !!! sourceTaskTimesList is wrong !!!
           // !!! should be sinkTaskTimesList !!!
            this.sinkTaskTimesList.add(new CallSnapshot(System.currentTimeMillis(), sinkTaskTimesTotal()));
            if (this.sourceTaskTimesList.size() > (MAX_RECORDS_OF_SAMPLING + 1)) {
                this.sourceTaskTimesList.removeFirst();
            }
        } finally {
            this.lockSampling.unlock();
        }
    }
@VictoryAnn VictoryAnn changed the title Connect runtime happen out of memory Connect runtime out of memory Oct 24, 2024
@VictoryAnn VictoryAnn changed the title Connect runtime out of memory 【BUG】Connect runtime out of memory Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant