On RHEL servers, changing the semaphore value fails with a message "setting key "kernel.sem": Numerical result out of range".

Solution Verified - Updated -

Issue

  • On RHEL 7.8 and 8.1 servers, setting the value of semaphore parameter SEMMNI beyond 32768 fails with the error message sysctl: setting key "kernel.sem": Numerical result out of range.
# sysctl -w kernel.sem="4096 2048000 32 32769"
sysctl: setting key "kernel.sem": Numerical result out of range
kernel.sem = 4096 2048000 32 32769
  • Anything up to and including 32768 succeeds :
# sysctl -w kernel.sem="4096 2048000 32 32768"
kernel.sem = 4096 2048000 32 32768
  • This also applies to kernel.msgmni and kernel.shmmni

Environment

  • Red Hat Enterprise Linux 7.8
    • starting with kernel version 3.10.0-1127.el7.x86_64
  • Red Hat Enterprise Linux 8.1
    • starting with kernel version 4.18.0-147.el8_1.x86_64
  • Red Hat Enterprise Linux 9

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content