Deployment Error: Ran out of memory (used over 512MB)

I am getting the following error while deploying Python-Flask App

My start command is:
gunicorn main:app

I also have Gunicorn in my requirements.txt file

I’ve been having trouble with this and would appreciate any kind of help.

Hi,

If the service if showing it ran out of memory, you’ll either need to reduce your projects memory requirements or use a larger instance type with more RAM.

It looks like your service is downloading something on start up. That feels like something that should occur in the build step/Build Command.

Alan

Even I don’t understand what it’s downloading while starting up.
Although, I have the requirements downloaded in the build step using pip install -r requirements.txt command.

As far as I think, the shouldn’t require more space.

I suspect you’re using some sort of machine learning model, which is likely resource intensive. The issue isn’t about space/storage, it’s about memory. Free instances have 512MB of RAM, which is a small amount if you’re trying to do anything computationally “heavy”.

Alan

Ahh, I see.
Thanks for you time.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.