Getting intermitent error Cannot allocate memory '/usr/local/airflow/include'

I have recently added a new folder in the include directory named as common in which I am trying to place a py file that will handle all the common functions used across the dags. But post this implementation, I am getting intermitent error error Cannot allocate memory ‘/usr/local/airflow/include’ but then when I restart the astro it gets resolved. What should be the cause for this?

Hi @dilipkurup, Thank you for reaching out! Did the issue occur only once or you are seeing this repetitively? Further are sufficient CPU and memory resources allocated to Docker (if you are using the Docker) or Collima/podman?

Could you please help with Versions for the following

  • Astro CLI

  • Astro Runtime

  • Docker Engine

Further, If you are modifying the include folder, requirements.txt, dockerfile, packages.txt etc that is modifying anything outside the dags folder then it is best to do astro dev restart to rebuild the Astro Project for the recent changes to get deployed to Docker containers and come into effect.

Hope this helps!

Hi @iamakashladdha , I am seeing this very frequently. But when I restart the astro using astro dev start this issue gets resolved.

Please find the version details below:

Astro CLI version : 1.17.1
Astro runtime : 8.8.0
I am using Podman

Can you ellaborate on how can I increase the memory for podman locally on my mac?

Regards,
Dilip Kurup

Hi @dilipkurup,

Thanks for sharing the details! So it is Podman with Mac. It helps to debug this further.

Are you by chance using Mac M1?

  • Then would suggest turning on rootful mode for Podman by using podman machine set --rootful . A Podman bug currently causes issues with volumes when running in rootless mode on M1. This may help!

Further, below are other Pre-requisites for running Podman documented here

  • Podman 3 or later. See Getting started with Podman.
  • A running Podman machine with at least 4 GB of RAM. To confirm that Podman is running, run podman ps.

And would suggest following the setup steps mentioned here Podman Setup and Troubleshooting the Podman configuration.

Also, I noticed that you are using Astro CLI version 1.17.1 and Astro Runtime 8.8.0, As a best practice would advise you to download the Latest Astro CLI Version v1.20.0 and use the Latest AstroRuntime 9.5.0 for running Airflow in your local environment to achieve the best results.

Hope above mentioned best practices and suggestion resolves your issues and get you a better development experience with Astro CLI.

Please try those out and share the feedback!

Regards,
Akash Laddha