Jason Safaiyeh (safaiyeh)Engineer running the AI SDK in a production APIChappie
A production API on AWS Fargate with a 2 GB memory limit that sends PDFs to models as AI SDK file parts. The issue names no company. Chappie is the company on the reporter's GitHub profile.
GitHub, vercel/ai, published Read the write-up (opens GitHub, vercel/ai in a new tab)
Observation
In a production incident on an API Jason Safaiyeh runs, one 14 MB PDF sent through the AI SDK killed a 2 GB container in about 40 seconds and took about 100 requests with it.
- Takeaway
- Load-test the largest file a user can upload through the exact SDK version you ship, and alarm on container memory well below the limit.
- What happened
- On Sep 1, 2026 a single 14,078,689-byte PDF sent as a file part took a production task from about 640 MB to its 2 GB limit in about 40 seconds. The out-of-memory kill failed about 100 requests, 94 of them load balancer 502 errors (GitHub issue, Sep 1, 2026). The cause was the SDK's per-byte base64 encoding of file parts. Maintainers reproduced it on AI SDK 5 and 6 and closed the issue with a fix on Sep 8, 2026.
“On 2026-09-01 this OOM-killed one of our production API tasks (AWS Fargate, 2GB memory limit) in ~40 seconds: a single 14,078,689-byte PDF sent as a Uint8Array file part. The task went from a flat ~640MB to a hard kill at the container limit inside one minute, taking ~100 requests with it (94× ALB 502s) before ECS replaced it.”
- Public engineering write-up (GitHub issue)
- Team metrics reported
Deployment details
A production API on AWS Fargate with a 2 GB memory limit that sends PDFs to models as AI SDK file parts. The issue names no company. Chappie is the company on the reporter's GitHub profile.
- Public engineering write-up (GitHub issue)
- Team metrics reported
- Team
- One production API team, unnamed in the issue
- Workload
- A production API that sends PDFs to models as file parts
- Product version
- AI SDK file parts; maintainers reproduced the fault on versions 5 and 6
- Measurement
- About 100 failed requests, 94 of them 502 errors, in one out-of-memory kill




