Open rgeary1 opened 5 years ago
Most tutorials on nix start with "nix-env -qa". However if you run this on a standard AWS free-tier t2.micro node it runs out of memory and kills the machine. "unable to fork: Cannot allocate memory"... When the node dies, it requires a hard reboot.
This type of issue has been reported before (https://github.com/NixOS/nix/issues/421 https://github.com/NixOS/nixpkgs/issues/12019) but does not specifically address the issue from the perspective of new Nix users like me.
Is there a hard technical reason why "nix-env -qa" requires more than 500Mb of RAM? Or is it possible to significantly improve the memory consumption?
Maybe it is possible to modify nix-env to detect that you are running low on RAM and terminate itself before it kills the machine?
If "nix-env -qA " is considered the right way to query, why not reach out to tutorial writers?
I marked this as stale due to inactivity. → More info
I closed this issue due to inactivity. → More info
Still having this problem
Most tutorials on nix start with "nix-env -qa". However if you run this on a standard AWS free-tier t2.micro node it runs out of memory and kills the machine. "unable to fork: Cannot allocate memory"... When the node dies, it requires a hard reboot.
This type of issue has been reported before (https://github.com/NixOS/nix/issues/421 https://github.com/NixOS/nixpkgs/issues/12019) but does not specifically address the issue from the perspective of new Nix users like me.
Is there a hard technical reason why "nix-env -qa" requires more than 500Mb of RAM? Or is it possible to significantly improve the memory consumption?
Maybe it is possible to modify nix-env to detect that you are running low on RAM and terminate itself before it kills the machine?
If "nix-env -qA" is considered the right way to query, why not reach out to tutorial writers?