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

Fix unclosed requests #334

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

gfmio
Copy link

@gfmio gfmio commented Aug 31, 2023

This PR fixes the unclosed response warnings that Statefun reports when an HTTP request by Flink fails. These unclosed reqeusts currently spam the logs and result in a small memory leak.

The PR also sets the recommended logger setting to get more details about the issue when it occurs.

Example:

Aug 09, 2023 9:28:57 AM okhttp3.internal.platform.Platform log
Aug 9 10:28:57 <POD> taskmanager WARNING WARNING: A connection to http://worker:9090/ was leaked. Did you forget to close a response body? To see where this was allocated, set the OkHttpClient logger level to FINE: Logger.getLogger(OkHttpClient.class.getName()).setLevel(Level.FINE);

@gfmio gfmio marked this pull request as ready for review August 31, 2023 11:52
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.

1 participant