Question
Below Linux shell script: for i in {1..1000000000} do echo $RANDOM >> file1.txt done is getting KILLED with following error messages in the /var/log/messages Feb
Below Linux shell script:
for i in {1..1000000000} do echo $RANDOM >> file1.txt done
is getting KILLED with following error messages in the /var/log/messages
Feb 11 17:05:56 localhost kernel: [ 3743] 0 3743 7933296 2345725 14543 5093695 0 sh Feb 11 17:05:56 localhost kernel: Out of memory: Kill process 3743 (sh) score 931 or sacrifice child Feb 11 17:05:56 localhost kernel: Killed process 3743 (sh), UID 0, total-vm:31733184kB, anon-rss:9382840kB, file-rss:60kB, shmem-rss:0kB
I have a VM with Linux 7, 10GB RAM, 4 CPU threads and 20G swap space. Can someone advise how I can overcome with this error. I have tried below setting but no luck: sysctl -w vm.oom_kill_allocating_task=0
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started