Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

forgot to call close connection  RSS feed

 
Ranch Hand
Posts: 43
Chrome Java Notepad
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I used okhttp library to call API Calls on a website of mine based on WordPress. In that call, I forgot to close connection in the end and called various endpoints on the loop. Next morning I saw that the CPU and RAM usage was still high even after 6 hours of performing calls, which led me to infer that the possibility is that I forgot to close the connections and when I checked I saw I forgot to call response.body().close()

Now here is am thinking,  doesn't the server close the connection automatically and release resources after a certain time if I don't  close connection manually?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!