Memory Leak within load_ssl_context_verify
when using openai-python
#3272
Unanswered
vasudua
asked this question in
Potential Issue
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
langchain
initialises anopenai-python
instance which in turn defines a default httpx client something like here when a custom http_client is not passed as an argument to the class initialization. And this httpx client defined continues to hold memory even after the parent object is destroyed.The place where the memory is being held up is
load_ssl_context_verify
, memray results follow.As shown in the above screenshot, it is holding ~88 MBs of memory. This memory keeps growing with each new instance of the above classes created and never gets released even when the parent objects of the above mentioned libs are destroyed.
Expected Behaviour
The memory should be released once the parent instances are destroyed.
Beta Was this translation helpful? Give feedback.
All reactions