Skip to content

Running the same batch task multiple times using the Flink Session pattern causes the linux out of memory #4305

Closed
@renshangtao

Description

@renshangtao

I have A batch task that inserts 100 million data from table A into table B after the primary key hash. I use Flink mode to execute this task. After several times of executing this task, I find that the Flink TaskManager process occupies more and more memory. Finally, the Flink TaskManager process is killed when the system runs out of memory.

Manually performing GC memory reclamation after the task execution is completed has no effect, and viewing memory through top does not decrease. unless the Flink TaskManager is turned off.

Logically, when a task is finished, it should release the resources it occupies, so that subsequent tasks can continue to run, but it does not.

The growth of memory occurs in the icebergStreamWriter stage, but I look at the code and do not find a place to use off-heap memory, so it is more confusing, can anyone help me?

image

Memory usage is 25% before running the job, and 72% memory is reached after three times
image

The Configuration
006

The System kill taskmanager process
003

Activity

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

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions