BlogStart

Your app ran out of memory while starting up How to fix it.

Each app has 1 GB of memory, and a Java app has 2 GB. If your app loads something big when it starts, it can run out before it ever listens.

How the Agent API works
What you see
Your app built successfully, then ran out of memory while starting up and was
stopped before it could listen on port 8501.
  • What it meansThe app used all its memory
  • The limit1 GB per app, 2 GB for Java
  • Fix oneLoad big things lazily
  • Fix twoUse a hosted model

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

  1. 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.

  2. 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.

  3. 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.

01Questions

Memory questions, answered.

Anything else? Write to us and a person answers.

support@antideploy.com
Can I get more memory?

Each app is 1 GB (a Java app is 2 GB), on every plan, today. If your app genuinely cannot start in that much, write to support@antideploy.com.

How do I see memory use?

Not as a chart. Antideploy checks whether an app is running, crashing or out of memory about every five minutes, and emails you when it is down.

Does this failed deploy cost anything?

No. Failed deploys never count against your plan.

Deploy something. Start with one sentence.

Paste one sentence into your coding agent, click Approve once, and get a live link. No card, no trial clock.

Start from GitHub or a folder
Prompt copied Paste it into Claude Code, Codex or Cursor and press Enter.