When I deploy to Vercel, I consistently get an error saying “A Serverless Function has exceeded the unzipped maximum size of 250 MB”. I get no other error message. The function should run as intended.
I have tried to follow other posts with similar issues but to no avail. It seems like there is no specific fix for this issue.
The minimum requirements for my build are:
numpy
pandas
python-dotenv
scikit-learn
supabase
tqdm
requests
joblib
as per my requirements.txt
file.
My vercel.json
file is
{
"version": 2,
"crons": [{
"path": "/api/analyze",
"schedule": "1 0 * * *"
}]
}
I have tried using React 22.0, 20.0, and 18.0, with no luck.
pawlean
(Pauline P. Narvas)
January 20, 2025, 12:51pm
2
Hi, Jack! Welcome to the Vercel Community
Do you know what the size of your function is currently?
Hi, @vdatttiwari-complian ! Welcome to the Vercel Community
It looks like you exceeded the maximum size of 250 MB on your project.
From the documentation:
For Serverless Functions, the maximum uncompressed size is 250 MB including layers which are automatically used depending on runtimes . These limits are enforced by AWS .
You can use includeFiles and excludeFiles to specify items which may affect the function size, however the limits cannot be configured. These configurations are not…
system
(system)
Closed
February 19, 2025, 12:51pm
3
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.