Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [out-of-memory]

The tag has no usage guidance.

1
vote
2answers
41 views

Prevent the machine being slowed down by running out of memory

My software runs a command that looks something like: find | xargs do a potentially memory hungry job The problem is that sometimes a potentially memory hungry job gets too hungry, the system gets ...
0
votes
0answers
25 views

When exactly OOM_KILLER will be invoked

I currently have the situation where OOM_KILLER is invoked while (i think) there is some RAM not used. I know that is will happen when "there is no more memory in the system", but then what is the ...
1
vote
1answer
215 views

How to limit swap usage in Solaris?

I have an Oracle Solaris 11.3 which has 128 GB of Memory (RAM) and 80 GB of Swap. I want to limit the use of swap space (not its size just the usage). I know in more modern linux distros ...
0
votes
1answer
113 views

httpd hogging all memory until server crash

The server in question is used for processing data into reports, it has three cron jobs which execute every minute to check the process queue and if anything is found they'll keep running until the ...
0
votes
1answer
291 views

Shell-script to periodically free some memory up with Ubuntu 18.10 LiveCD with only 4GB of RAM. Need some improvement

Edit 1: The freezing just happened and I was able recover from it. Log(syslog) from the freezing until 'now': https://ufile.io/ivred Edit 2: It seems a bug/problem with GDM3. I'll try Xubuntu. Edit ...
3
votes
2answers
320 views

Why does linux out-of-memory (OOM) killer not run automatically, but works upon sysrq-key?

I have found that when running into an out-of-memory OOM situation, my linux box UI freezes completely for a very long time. I have setup the magic-sysrq-key then using echo 1 | tee /proc/sys/...
1
vote
1answer
639 views

Why is the Linux OOM killer terminating my programs?

I am running a complex workflow via bash scripts, which are using external programs/command to do different things. It runs fine for several hours, but then suddenly the OOM killer terminates programs ...
0
votes
0answers
205 views

How to send a notification alert when a process is killed by the OOM killer?

So every now and then (once in a month or two) one of our processes, running a critical piece of code that we don't want to touch, is being killed by the Out Of Memory killer. It says so in /var/log/...
1
vote
0answers
602 views

Debian Server: Out of Memory: kill process [closed]

I run a debian Webserver with nextcloud. Every night a backup job (storeBackup) is scheduled and it only succeeds in very few cases. But every night the journal is full of OOM Errors (see below). The ...
2
votes
1answer
2k views

systemd memory limit not working/example

I'm trying to use the systemd infrastructure to kill my memory leaking service when its memory usage reaches some value. The configuration file used is this: [Unit] Description="Start memory gobbler" ...
0
votes
1answer
175 views

What is the relationship between oom_score and badness?

Whilst reading both https://lwn.net/Articles/391222/ and http://man7.org/linux/man-pages/man5/proc.5.html I have come across the terms oom_score and badness. Both numbers have the same basic meaning; ...
2
votes
1answer
167 views

How to reduce OOM score for X11 with systemd

When my PC runs out of memory, the Linux OOM killer likes to kill Xorg first rather than the actual app using a lot of memory, which for the most part takes down the whole system (killing all my apps ...
2
votes
0answers
752 views

Slab cache affecting used memory much more than /proc/meminfo suggests

I'm dealing with a memory issue that is affecting hundreds of machines in AWS. They are i3.4xl instances with 120GB of RAM. There is a Java database server running inside a Docker container that ...
14
votes
1answer
355 views

Is it wrong to think of “memfd”s as accounted “to the process that owns the file”?

https://dvdhrm.wordpress.com/2014/06/10/memfd_create2/ Theoretically, you could achieve [memfd_create()] behavior without introducing new syscalls, like this: int fd = open("/tmp", O_RDWR | ...
0
votes
3answers
117 views

What happens if a Linux distro is installed with no swap and when it’s almost out of RAM executes a new application? [duplicate]

What happens if a Linux, let’s say Arch Linux or Debian, is installed with no swap partition or swap file. Then, when running the OS while almost out of RAM, the user opens a new application. ...
1
vote
1answer
1k views

Completely disable oom killer

I'm having some intermittent issues that appear to be related to the oomkiller purging some child processes, but I can't see why. Is there a convenient way that I can suppress all oomkiller activity ...
2
votes
1answer
37 views

Is there a way in Linux to preserve folder size for safety

I want to install a data manipulation solution. The solution is deployed in a folder in home directory. Free space in disk is uncontrollable and can shrink at any moment (other users data). How can I ...
2
votes
2answers
257 views

How to avoid high latency near OOM situation?

Minimal test case when Linux system does not have swap (or run sudo swapoff -a before testing). Run following bash one-liner as normal user: while true; do date; nice -20 stress --vm-bytes $(awk '/...
1
vote
2answers
308 views

Why the kernel doesn't stop processes starving the resources?

I'm running a linux box(ubuntu) and every few months it freezes and I'm left with no choice(SysRq-F and other keyboard shortcuts are not working) but to reboot it losing all the data. I'm wondering ...
5
votes
2answers
11k views

Memory runs full over time, high “buffer/cache” usage, low “available” memory

Whenever I reboot my laptop, everything runs amazingly and I have a maximum of 40% memory usage (out of 8GB). However over time (~ 1 day of usage), memory usage goes up to 90%+, and the system starts ...
2
votes
2answers
2k views

How set the “oom_score_adj” when(before) run target program?

Directly set by echo 1000 >/proc/<pid>/oom_score_adj is unreliable because target program is already running , in this case maybe target program caused OOM before echo 1000 >/proc/<pid&...
1
vote
1answer
62 views

Can a process allocate cache memory such that the kernel can seize it when necessary?

I'm asking specifically about Linux, but an answer that applies to Unix in general (i.e. POSIX or similar) would be even better, obviously. Linux uses free memory (i.e. that memory which is not yet ...
0
votes
0answers
48 views

How to avoid a situation where the system is too out-of-memory to even show or kill processes?

I recently ran into a situation where a system was too out-of-memory to even run pkill or htop, or to even create a swap file. (But somehow I could still SSH into the system, so at least I had a ...
1
vote
1answer
91 views

reserve memory for a set of processes

How can I reserve some amount of memory for a set of UI processes(window manager, x server, a terminal and a shell) running on my system. I'm tired of having to force a reboot because of some resource ...
0
votes
1answer
690 views

Debugging Linux oom-killer - little to no swap use

We build a system that's intended to be on all the time - it collects and displays graphs of data. If we leave it without changing anything for long enough, we end up with an oom-killer event. That ...
1
vote
1answer
171 views

Linux not giving up cached memory

I'm running a yocto build with 4.4.91 kernel on an embedded device with 256mb RAM, no swap. I'm trying to download a large file onto mmc flash via tftp command, during which according to /proc/...
0
votes
0answers
43 views

Execute command with memory constrains [duplicate]

I routinely perform numerical computations in my laptop, using programs that I write myself in Python, Julia, C++, etc. I am not a perfect programmer (far from it), and I make coding errors frequently....
2
votes
1answer
497 views

How can I enable 4G/4G split in Linux?

It is an useful feature for systems which are using (...still have to use) 32-bit binaries, and the 4G limit came into consideration. It essentially means, that the 32-bit user-space code, the 32-bit ...
2
votes
0answers
1k views

Finding which specific Python process was killed by Linux OOM killer

I'm trying to figure out which specific Python process or executable was killed by the Linux OOM killer. In /var/log/messages I get this: Aug 18 03:19:11 169 kernel: [ 7747] 0 7748 3226957 ...
2
votes
1answer
3k views

Docker “cannot allocate memory” - virtual memory tuning

We are building or running Docker containers in our Jenkins instances built on top of Centos7 within AWS EC2. We have 2 instances of t2.medium boxes with 2 CPUs and 3.5 Gb of Available memory. In once ...
3
votes
1answer
692 views

How can the OOM killer kill ulimit(ed) process?

I'm playing with MongoDB clusters. After few OOM killers, I decided to ulimit mongoDB with memory to 4G of RAM. After few hours, it was killed again with OOM. So my question is not about MongoDB, it's ...
1
vote
1answer
456 views

What does heuristics in Overcommit_memory =0 mean?

I read through the docs of man proc. When it comes to the overcommit_memory, the heuristics in overcommit_memory=0 isn't understood well. What the heuristics actually mean? does "calls of mmap(2) ...
1
vote
1answer
54 views

Can I overcome over-committing memory issue in Linux?

I am trying to delete an extensive number of files(in several million) with command, find . -name "file*" -delete Terminal showed output of Killed. I searched over the internet and seen dmesg, Out ...
22
votes
1answer
2k views

OOM killer doesn't work properly, leads to a frozen OS

For years, the OOM killer of my operating system doesn't work properly and leads to a frozen system. When the memory usage is very high, the whole system tends to "freeze" (in fact: becoming extremely ...
4
votes
1answer
777 views

Restart system if it runs out of memory?

I need to run some memory heavy tests in a remote computer through SSH. Last time I did this, the computer stopped responding, and it was necessary for someone to physically reboot it. Is there a way ...
3
votes
1answer
155 views

VmHWM only 25% whereas it should be around 80%

I have a dedicated MySQL server equipped with 128 GB RAM. MySQL recently gets killed by the oom-killer, although MySQL is configured to use 95 GB in the worst case. In my research I came across this: ...
1
vote
1answer
231 views

Restricting CPU memory usage for services to prevent a crash [duplicate]

I'm running a Ubuntu VM with an 8 GB RAM with docker containers ( 8 GB is just about enough for my requirements) but at some point the VM freezes/crashes due to memory exhaustion leaving me no choice ...
7
votes
2answers
1k views

How to trigger action on low-memory condition in Linux?

So, I thought this would be a pretty simple thing to locate: a service / kernel module that, when the kernel notices userland memory is running low, triggers some action (e.g. dumping a process list ...
5
votes
1answer
6k views

How to make OOM killer log into /var/log/messages when it kills any process?

I use CentOS 7 with kernel 3.1.0 I know there is a hitman in Linux called oom killer which kills a process that uses too much memory out of available space. I want to configure it to log the ...
5
votes
1answer
6k views

System unable to allocate memory even though memory is available

I'm running Gentoo on my server, and I've just upgraded from kernel 4.4.39 to 4.9.6, with the kernel configuration essentially unchanged. My system log is filling up with error reports such as the ...
1
vote
1answer
583 views

Ansible triggering oom-killer

Running ArchLinux uname -a: Linux localhost 4.7.2-1-ARCH #1 SMP PREEMPT Sat Aug 20 23:02:56 CEST 2016 x86_64 GNU/Linux 16gb of RAM 14gb swap When I run big ansible jobs, it triggers my oom-killer....
8
votes
1answer
1k views

Why is Linux kernel killing processes when it has 14GB free memory, and how to fix it?

Output of free showed that my applications only use 2GB, swap was not used at all. Yet my applications were being killed (Skype, Firefox, Thunderbird). I watched it on htop and it looked like they ...
6
votes
1answer
510 views

OOM from iterating over very large memory map

I'm writing a simulator that relies on generating a (potentially) very large problem domain. As the data can't fit in RAM, I use 4 four memory mapped files to hold it. This is a 64-bit application ...
0
votes
2answers
5k views

How to prevent Apache from consuming too much RAM

I'm running a http server based on ubuntu 16.04. Application is based on django (python) which is connected to apache via mod-wsgi. When I issue a command that consumes huge amounts of RAM, system ...
39
votes
4answers
35k views

Debugging high (near total) CPU/memory usage of “Web Content” application on Linux Mint

I have Linux Mint installed on 3 computers at home, and all of them are almost unusably slow whenever Firefox is open. Here is the output from top: As you can see, "Web Content" and Firefox are ...
2
votes
1answer
340 views

AIX - use ksh builtins to free memory when fork not possible

Context: an AIX lpar with very low memory (no forking possible, so only shell's builtins (cd, echo, kill) will work). I can have a (hmc) console to it, but I need a better way to start freing memory ...
0
votes
1answer
166 views

How to reduce the memory utilization by lsof.log?

lsof.log is consuming lot of space. The log file size has increased up to 7 GB. How do I optimize the space utilization by lsof.log file. Should I delete it on regular basis or is there a way around....
3
votes
1answer
486 views

OOM Killer keeps killing mysqld

I run a CentOS vps to host a few websites with cPanel/WHM but every now and then, my websites stop working because it can't establish a connection to the mysql database. Looking at the messages log, ...
8
votes
2answers
1k views

Is `make -j` (with no argument) dangerous? [closed]

Earlier today when building something, I decided to run make as $ make -j perhaps out of habit with other programs such as cabal where -j defaults to a reasonable limit. About 20 seconds later, my ...
4
votes
1answer
267 views

Decline malloc for memory hungry application

Is it possible to deny malloc instead of killing process selected by OOM killer? I think out of memory can be at least logged by the process which is better than being killed. Also, part of the ...