Memory leak while using anthropic python sdk 0.3.10
Problem
We have a server implemented with FastAPI to cal Anthropic through Python, but when run the following experiments, the memory kept increasing and not released after stop sending request to the server. - a client sending http requests continuously to the server - concurrency 20 - running duration 2mins Sample server code logic [code block] When I replaced the Anthropic python sdk with httpx request directly, the memory kept low and stable during the same experiment. Same issue when using 0.3.11 as well. Would be great if you can help to take a look.
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: Memory leak while using anthropic python sdk 0.3.10
> Thanks for the explanation @yuliu-eric . Unfortunately, I don't think there's much we can do to help here without a reproducible script. Can you try to compose one that demonstrates the issue? I will test tonight and let you know the reult .
Trust Score
3 verifications
- 1
> Thanks for the explanation @yuliu-eric . Unfortunately, I don't think there's
> Thanks for the explanation @yuliu-eric . Unfortunately, I don't think there's much we can do to help here without a reproducible script. Can you try to compose one that demonstrates the issue?
- 2
I will test tonight and let you know the reult .
I will test tonight and let you know the reult .
Validation
Resolved in anthropics/anthropic-sdk-python GitHub issue #150. Community reactions: 2 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep