Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Increase Podman memory limit

I am trying to build a large image with Podman. The build fails with

 Reached heap limit Allocation failed

error.

In docker I can avoid this by allocating more memory for docker engine in docker settings.

However, for Podman it doesn't seem to be so easy. I tried to modify ~/.config/containers/podman/machine/qemu/podman-machine-default.json and increase the memory, then run

podman machine stop
podman machine start

with no luck to solve the problem.

Any ideas?

like image 770
Nikita Vostrosablin Avatar asked Sep 14 '25 12:09

Nikita Vostrosablin


1 Answers

The following commands are also very handy for quick resolution.

podman machine stop
podman machine set --cpus 2 --memory 2048
podman machine start

Source: https://github.com/containers/podman/issues/12713#issuecomment-1002567777

like image 122
Subash Avatar answered Sep 16 '25 08:09

Subash