This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Hands On Software Engineering with Python and have Brian Allbey on-line!
See this thread for details.
Win a copy of Hands On Software Engineering with Python this week in the Jython/Python 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 ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

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

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?
Evacuate the building! Here, take this tiny ad with you:
ScroogeXHTML 8.0 - RTF to HTML5 and XHTML converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!