Feedback
Did this article resolve your question/issue?

   

Article

Would consuming all memory bring other databases down?

« Go Back

Information

 
TitleWould consuming all memory bring other databases down?
URL Name000065549
Article Number000182803
EnvironmentProduct: OpenEdge
Version: All supported versions
OS: Linux
Question/Problem Description
Would starting a database that consumes all memory bring other databases down?
If all available memory is used to start a database, why do other databases shutdown error 4194?
When a database's shared memory is destroyed by OOM killer sometimes the only evidence is in the system.log and the fact the .lk file is missing
Would consuming all memory bring other databases or the database requesting more memory than available down?
Operating system "Out of Memory killer" is  killing random OpenEdge process due to size of process memory when system runs out of memory.
What happens if a system runs out of memory?
Operating system killing processes due to memory shortage.
AppServer server killed by Linux Out of Memory killer due to shortage of RAM
WebSpeed agent killed by Linux Out of Memory killer due to shortage of RAM
Brokers fail to connect to shared-memory when a database is killed by the Linux OOM killer 

 
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
Cause
Resolution
Yes, the Out of Memory (OOM) killer will do that when enabled, everytime.

System logs from around the time of the behaviour will confirm:

Example:

kuk-qx kernel: [15709] 0 15709 5347 110 1 0 0 _mprosrv
kuk-qx kernel: [15720] 0 15720 2361279 328780 1 0 0 _mprosrv
kuk-qx kernel: Out of memory: Kill process 10126 (_progres) score 134 or sacrifice child
kuk-qx kernel: Killed process 10126, UID 500, (_progres) total-vm:5330656kB, anon-rss:4292kB, file-rss:1628608kB
kuk-qx kernel: Out of memory: Kill process 21066 (_progres) score 117 or sacrifice child
kuk-qx kernel: Killed process 21066, UID 500, (_progres) total-vm:5344688kB, anon-rss:18108kB, file-rss:1401832kB
kuk-qx kernel: Out of memory: Kill process 7543 (_progres) score 116 or sacrifice child
kuk-qx kernel: Killed process 7543, UID 500, (_progres) total-vm:5349984kB, anon-rss:9360kB, file-rss:1395376kB
kuk-qx kernel: Out of memory: Kill process 25421 (_progres) score 110 or sacrifice child
kuk-qx kernel: Killed process 25421, UID 0, (_progres) total-vm:5351912kB, anon-rss:2400kB, file-rss:1692496kB
kuk-qx kernel: Out of memory: Kill process 25427 (_progres) score 109 or sacrifice child
kuk-qx kernel: Killed process 25427, UID 0, (_progres) total-vm:5352364kB, anon-rss:8256kB, file-rss:1685168kB
kuk-qx kernel: Out of memory: Kill process 21973 (_progres) score 102 or sacrifice child
kuk-qx kernel: Killed process 21973, UID 500, (_progres) total-vm:5350628kB, anon-rss:9476kB, file-rss:1235044kB
kuk-qx kernel: Out of memory: Kill process 24746 (_progres) score 100 or sacrifice child
kuk-qx kernel: Killed process 24746, UID 500, (_progres) total-vm:5358904kB, anon-rss:17640kB, file-rss:1201736kB
kuk-qx kernel: Out of memory: Kill process 15720 (_mprosrv) score 90 or sacrifice child
kuk-qx kernel: Killed process 15720, UID 0, (_mprosrv) total-vm:9445116kB, anon-rss:544kB, file-rss:1455012kB
kuk-qx kernel: Out of memory: Kill process 95121 (_mproapsv) score 286 or sacrifice child
kuk-qx Kernel: Killed process 95121 (_mproapsv) total-
vm:92897448kB, anon-rss:65891048kB, file-rss:0kB, shmem-rss:8371980kB

The process which is chosen to die by the Linux OOM Killer, is based on a heuristics weighting and has nothing to do with the current ownership of executables. It has to do with how much memory that process is requesting at the time and since the Linux kernel has memory overcommit behaviour (as default), allowing processes to allocate more memory than is currently free and available on the system at the time, a database can be started with more memory than was currently available at the time.

As soon as the Linux Kernel runs out of memory, once old page frames have been reclaimed, the OOM killer kicks in and starts 'kill or sacrifice child' to keep the OS itself operational and prevent kernel panic.

The Linux OOM killer applies to any process running on the system. In the OpenEdge context, this could for example apply to running and IDXBUILD with -TF 100% or in reality a percentage of available memory higher than that available due to the fact Linux allows processes to start by over committing memory

Further research into the select_bad_process() OOM killer logic can be found in the OS documentation.

 
Workaround
Notes
Progress Articles:

 Microtransactions and error 2256
 Database crashes with error 4194 
 Intermittent java out of memory error for AppServer broker.   
 What is the OOM Killer (Out of Memory Killer)?


References to Other Documentation: 

The following example references are useful in further understanding the Linux OOM Killer:

Out of memory: Kill process or sacrifice child
https://plumbr.eu/blog/memory-leaks/out-of-memory-kill-process-or-sacrifice-child

How to Configure the Linux Out-of-Memory Killer:
http://www.oracle.com/technetwork/articles/servers-storage-dev/oom-killer-1911807.html

Capacity Tuning (overcommit_memory, Out-of-Memory Kill Tunables)
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Performance_Tuning_Guide/s-memory-captun.html

Out Of Memory Management
https://www.kernel.org/doc/gorman/html/understand/understand016.html

Overcommit Memory in SUSE Linux Enterprise Server
https://www.suse.com/support/kb/doc/?id=7002775
Last Modified Date4/1/2021 12:55 PM
Attachment 
Files
Disclaimer The origins of the information on this site may be internal or external to Progress Software Corporation (“Progress”). Progress Software Corporation makes all reasonable efforts to verify this information. However, the information provided is for your information only. Progress Software Corporation makes no explicit or implied claims to the validity of this information.

Any sample code provided on this site is not supported under any Progress support program or service. The sample code is provided on an "AS IS" basis. Progress makes no warranties, express or implied, and disclaims all implied warranties including, without limitation, the implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample code is borne by the user. In no event shall Progress, its employees, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code, even if Progress has been advised of the possibility of such damages.