Skip to content

Out-of-Memory Issues with Services

Diagnose OOM-killed HEAL services via Nomad allocations, memory limits, and logs.

4 min read Updated SS

Out-of-Memory Issues with Services#

Below are some of the System and Infrastructure issues:

  • Out Of Memory (OOM) issues with services
  • Unassigned Shards Detected
  • SSL errors or Issues with SSL

Case 1: SAN (Subject Alternative Name)

Case 2: Keycloak Bank signed certificates

  • Var Partition Is Full

Case 1: Docker/Podman

Case 2: HAProxy Logs

Case 3: /var Directory full in RHEL 8.2

  • Unable to create Logscan Raw Index and Datasource
  • Websphere Server-Side Certificate Creation Issue
  • Negative Minimum Response Time on OHS Dashboard
  • Issue with User Account Automatic Inactivation
  • Case 1: ETL Process Stopping Due to OOM Error
  • Case 2: URL Status KPI Mapping at Host Level
  • User Not Syncing from AD
  • Incorrect Script Output Format Impacting Data Collection
  • Failing in Installation of HEAL
  • IHS Data Collection not Happening
  • Tomcat Configuration Error
  • Data Collection Issue for JBOSS Component
  • Heat map data NA for CBC applications
  • ABAP Dump KPI Issue for SAP Category
  • Maintenance Window Extension Request
  • MongoDB Data Collection
  • Failing to Start Services Due to I/O Timeout Error
  • RPM Issue
  • Ad-hoc Maintenance Window Configuration
  • Unable to Baseline Capacity Forecasting (CF)
  • Event Correlation Baseline Issue

For reference:
The following section contains basic Linux commands: Basic Commands

Out Of Memory (OOM) Issues with Services#

Follow the below steps to check the OOM issues with the services.

1. Check the status of the service, by running the below command:

nomad status <service name>

For Example:

nomad status percona

2. Collect the allocation ID and run the below command:

nomad status <allocation ID>

For Example:

nomad status 7d15ecd6

Expected Output:

[root@server-01 ~]# nomad status 7d15ecd6
ID          = 7d15ecd6-4838-d5bd-9318-bbe24ebe84cd
Name        = percona.percona-node1[0]
Node ID     = 6fb2708a
Node Name   = server-01
Job ID      = percona
Job Version = 2
Client Status = running
Client Description = Tasks are running
Desired Status = run
Created     = 17d15h ago
Modified    = 47s ago
Deployment ID = ea652c42
Deployment Health = healthy

Task "percona-node1" is "running"
Task Resources
CPU    Memory   Disk    Addresses
9/2000 MHz  618 MiB/6.0 GiB  300 MiB

Task Events:
Started At   = 2023-06-16T05:56:37Z
Total Restarts = 16
Last Restart = 2023-06-16T11:26:19+05:30

Recent Events:
2023-06-16T11:26:37+05:30 Started Task started by client
2023-06-16T11:26:19+05:30 Restarting Task restarting in 17.474157053s
2023-06-16T11:26:19+05:30 Terminated Exit Code: 137, Exit Message: "OOM Killed"

Note: If a process exits with code 137 (OOM Killed), it means that the server is out of memory and the memory allocation must be increased.

3. To check the server memory availability, run the below code.

free -h

Expected Output:

              total    used    free   shared  buff/cache  available
Mem:           16Gi    4.7Gi   1.9Gi   838Mi     9.8Gi      10Gi
Swap:         8.4Gi      0B   8.4Gi

4. To check the utilization of the server, run the below command.

nomad node status -self

Expected Output:

ID    = 6fb2708a-fcdc-160c-84bb-93986bff0f7e
Name  = server-01
DC    = dc1
Drain = false
Eligibility = eligible
Status = ready
Uptime = 719h35m38s
Driver Status = docker,exec,java

Allocated Resources:
CPU: 20000/28930 MHz  Memory: 31 GiB/31 GiB  Disk: 4.1 GiB/13 GiB

Allocation Resource Utilization:
CPU: 2303/28930 MHz  Memory: 14 GiB/31 GiB

Host Resource Utilization:
CPU: 3634/28930 MHz  Memory: 17 GiB/31 GiB
Section Description
Allocation resource The total GB of resources allocated
Allocation Resource Utilization It's the overall service utilization of the memory
Host Resource Utilization Specific services at host-level utilization of the memory
Allocations The current running services are displayed.

5. If the memory is available in the server, increase the memory as per requirement.

6. To Increase memory, go to the respective server and execute the below command,

a1nomad

Or navigate to directory: /opt/heal/nomadFile

7. Execute the below command

vi <service name>.nomad

For Example: vi percona.nomad

Locate the resources block in the nomad file:

resources {
    cpu    = 4000
    memory = 6048
}

8. The memory is 6GB, increase it to as per the requirement.

Note: In HA mode, there will be multiple task under one service. Hence, the values should be updated in all the tasks.

9. Before starting the service, run the below command,

nomad plan <service name>.nomad

For Example: nomad plan percona.nomad

For information: The nomad plan is designed to offer several features that assist in reviewing, validating, and testing job configurations, estimating resource consumption, analyzing dependencies, reviewing modifications, and performing safety tests.

Expected Output:

Job: "percona"
Task Group: "percona-node1" (1 ignore)
  Task: "percona-node1"

Scheduler dry-run:
- All tasks successfully allocated.

Job Modify Index: 418657
To submit the job with version verification run:
nomad job run -check-index 418657 percona.nomad

10. The successful response is obtained, then start the service.

nomad run <service name>.nomad

For Example: nomad run percona.nomad