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

Avoid clearing buffer when ProducerError occurs in Passthru pipe #2138

Merged
merged 1 commit into from
Feb 2, 2024

Conversation

arunans23
Copy link
Member

Resolves wso2/product-micro-integrator#3081

This PR resolves an OOM issue where a loop scenario is created when the backend resets the connection without properly sending the complete payload. When backend closes the connection, the producerError flag of the Passthru Pipe is set to true. A previous fix[1] has been introduced to clear the buffer during such scenarios. But when the buffer is cleared, the read position of the buffer is set to 0. Hence IOUtils.copy() method tries to copy the same inputStream to outputStream again and again which leads to the OOM issue.

Screenshot 2024-01-22 at 11 25 56

[1] - #1933

@isudana isudana merged commit 3dcb30c into wso2:master Feb 2, 2024
1 of 2 checks passed
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

Successfully merging this pull request may close these issues.

OOM issue when backend reset the connection while sending a large json payload
2 participants