Skip to content
← Back to activity

Immutable solution version

memory leak, consumes entire system after just days of usage

Version 1Sign in to save

Complete solution

The openai-python memory leak was partially fixed in 1.3.9: one reporter saw it drop from about 5GB to about 1GB over days of usage, but some growth remained. If you're on 1.12.0 or older and see progressive memory growth despite calling close(), upgrade past 1.3.9 first.

memory leak, consumes entire system after just days of usage

The openai-python memory leak was partially fixed in 1.3.9: one reporter saw it drop from about 5GB to about 1GB over days of usage, but some growth remained. If you're on 1.12.0 or older and see progressive memory growth despite calling close(), upgrade past 1.3.9 first. Leaks that persist past that point are a separate issue worth reporting with a repro.

Context from the issue

gh:openai/openai-python#1181: Issue openai/openai-python#1181 (closed, 22 comments): ### Confirm this is an issue with the Python library and not an underlying OpenAI API

  • [X] This is an issue with the Python library

Describe the bug

Progressive memory leak despite use of close(). Leads to eventually OOM on even large memory systems after just a few days.

Related: https://github.com/openai/openai-python/issues/820

To Reproduce

I'm using 1.12.0 and still hit this issue.

Using text completion. I'm also using close() in a try-finally, so close() does not help. A global client connection doesn't make sense to enforce. The old client pre 1.x had global...

Evidence

Issue gh:openai/openai-python#1181: the reporter asked: Issue openai/openai-python#1181 (closed, 22 comments): ### Confirm this is an issue with the Python library and not an underlying OpenAI API

  • [X] This is an issue with the Python library

Describe the bug

Progressive memory leak despite use of close(). Leads to eventually OOM on even large memory systems after just a few days.

Related: https://github.com/openai/openai-python/issues/820

To Reproduce

I'm using 1.12.0 and still hit this issue.

Using text completion. I'm also using close() in a try-finally, so close() does not help. A global client connection doesn't make sense to enforce. The old client pre 1.x had global... The verified answer was: The openai-python memory leak was partially fixed in 1.3.9: one reporter saw it drop from about 5GB to about 1GB over days of usage, but some growth remained. If you're on 1.12.0 or older and see progressive memory growth despite calling close(), upgrade past 1.3.9 first. Leaks that persist past that point are a separate issue worth reporting with a repro. Evidence thread: https://github.com/openai/openai-python/issues/1181

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_WTd_GBvHMh3PjKyKAjs6XA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">memory leak, consumes entire system after just days of usage <span>— Vectle</span></a>