You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 16, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 16, 2026. It is now read-only.
[BUG]The request.timeout.ms setting is too large to cause broker full gc or oom #1739
Describe the bug
The request.timeout.ms setting is too large to cause broker full gc or oom.
The reason is that after the batch data is sent, producePurgatory will not clean up the delayed task DelayedProduceAndFetch in time, it needs to wait until the delayed task expires to trigger the clearing
To Reproduce
request.timeout.ms set relatively large, or even Integer.MAX_VALUE
I think you should better setting the publish rate instead of depending on the request.timeout.ms, which was added only to avoid some bugs that make KoP hang.
I think you should better setting the publish rate instead of depending on the request.timeout.ms, which was added only to avoid some bugs that make KoP hang.
The scene of this problem is to use MirrorMaker2 for data migration. It sets the request.timeout.ms = Integer.max_value, so that the problem is caused. If the client is set up by mistake, it is easy to cause cluster stability. To achieve logic, after the Kafka meets the high water level, it will cancel the delay task
Got it. So it can be reproduced by configuring request.timeout.ms with Integer.MAX_VALUE?
request.Timeout.ms configuration value determines the time of the time of the delay task. Set to Integer.MAX_VALUE represents the backlog of the memory forever, and it will not be removed.
Activity
BewareMyPower commentedon Feb 28, 2023
I think you should better setting the publish rate instead of depending on the request.timeout.ms, which was added only to avoid some bugs that make KoP hang.
keyboardbobo commentedon Feb 28, 2023
The scene of this problem is to use MirrorMaker2 for data migration. It sets the
request.timeout.ms = Integer.max_value, so that the problem is caused. If the client is set up by mistake, it is easy to cause cluster stability. To achieve logic, after the Kafka meets the high water level, it will cancel the delay taskBewareMyPower commentedon Feb 28, 2023
You should set the publish rate to avoid OOM. It's the same for Pulsar.
keyboardbobo commentedon Feb 28, 2023
We have a small sending rate, but this problem has nothing to do with the rate. It is a memory leak
BewareMyPower commentedon Feb 28, 2023
Got it. So it can be reproduced by configuring
request.timeout.mswithInteger.MAX_VALUE?keyboardbobo commentedon Feb 28, 2023
request.Timeout.msconfiguration value determines the time of the time of the delay task. Set toInteger.MAX_VALUErepresents the backlog of the memory forever, and it will not be removed.BewareMyPower commentedon Feb 28, 2023
Ideally, this delayed task should be removed once the callback is triggered even if it does not time out. I will write a test to verify it.
keyboardbobo commentedon Feb 28, 2023
Yes, it should be removed after all partition tasks are completed. we have fixed it...
BewareMyPower commentedon Feb 28, 2023
Could you open a PR if you have fixed it?
keyboardbobo commentedon Feb 28, 2023
Ok, I'll submit the PR late
If all partition messages are sent, cancel the delayed tasks to avoid…
If all partition messages are sent, cancel the delayed tasks to avoid…
If all partition messages are sent, cancel the delayed tasks to avoid…
If all partition messages are sent, cancel the delayed tasks to avoid…