OkHttpClient - A connection to [issuer] was leaked
See original GitHub issueHi,
We’re using com.auth0:auth0:1.0.0 and com.auth0:auth0-spring-security-api:1.0.0-rc2 inside a spring-boot 1.5.1.RELEASE application. When calling the Auth0 API, we occasionally see a log warning that apparently emanates from okhttp3:
2017-02-27T08:05:05.453 WARN okhttp3.OkHttpClient - A connection to https://[our-issuer-id].auth0.com/ 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);
Looking it up it seems the possible cause is that the body of the request needs to be explicitly closed when the response code is not 200. See https://github.com/square/okhttp/issues/2311.
Thanks!
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
OkHttpClient connection was leaked warning · Issue #6 - GitHub
OkHttpClient : A connection to https://cdn-global.configcat.com/ was leaked. Did you forget to close a response body? To see where this was ...
Read more >OkHttp: avoid leaked connection warning - java - Stack Overflow
I am using OkHttp 3, and I keep getting leaked connection warnings: WARNING: A connection to https://help.helpling.com/ was leaked.
Read more >okHttp client reports leaking connection : UP-10647 - YouTrack
okHttp client reports leaking connection ;, set the OkHttpClient logger level to FINE ; : Logger.getLogger ; (OkHttpClient.class.getName ; ).setLevel ...
Read more >leak in android httpclient HttpURLConnectionImpl ...
I encountered this issue on a Samsung SM-G980F running Android 10 / API 29. ... To fix the strictmode violation, uncomment the indicated...
Read more >connection to sonarqube was leaked - Google Groups
Hi During an analysis I just got the following exception: A connection to https://sonarqube.company.com/ was leaked. Did you forget to close a response...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@lbalmaceda how do I know if there was a regression on this issue or if it’s a new issue?
I don’t know how to reproduce or get more info but I’m seeing this in my logging:
And I can’t find much about this anywhere else (I’m using React-native-intercom 18, upgrade to 19 didn’t change it)
Hi @shiloa, We fixed that in https://github.com/auth0/auth0-java/pull/38. You’ll see it in the next release.
Cheers,