What it means
The build worked. When the app started, it used all of its memory and was stopped before it could answer. Every app on Antideploy has 1 GB of memory, except a Java app, which has 2 GB. Because the app never reached a listening socket, the port is not the problem, and no start command would fix it.
How to fix it
-
Find what loads at startup
A machine learning model, a large dataset, or a large file read into memory at import time is the usual cause.
-
Load it the first time it is needed
Load the model or data on the first request, not when the file loads. In Streamlit, cache it with
st.cache_resource. -
Or use a hosted model
Call a model over the network instead of loading its weights. Your agent can create an AI key for you. See how to add AI to your app.
Memory in Node.js
A Node.js app can also run out of memory. Look for large caches that grow without end, whole files read into memory, or a huge number of items held at once.