When the apache server is used, the following error occurs:
Copy codeThe Code is as follows: shmget () failed: Invalid argument
Failed to start up concurrent users module!
Check that the setting for kernel. shmmax is invalid (copy another system, the value setting is too large)
As follows:
Copy codeThe Code is as follows: [root @ localhost ~] # Sysctl-a | grep shmm
Kernel. shmmni = 4096
Kernel. shmmax = 0
[Root @ localhost ~] # Vi/etc/sysctl. conf
Kernel. shmmax = 2147483648
Kernel. shmall = 1073742
[Root @ localhost ~] # Sysctl-p
[Root @ localhost ~] # Sysctl-a | grep shm
Vm. hugetlb_shm_group = 0
Kernel. shmmni = 4096
Kernel. shmall = 1073742
Kernel. shmmax = 2147483648
Description of kernel. shmmax values:
Unit: bytes. We recommend that you use half of the physical memory.
Taking 4G memory as an example: 4096/2*1024*1024 = 2147483648
Description of kernel. shmall values:
Unit: page. 1 page = 4 k, set the value to the physical memory size
Taking 4G memory as an example: 4096*1024*1024/4000 = 1073742
Note: The preceding two values do not take effect if they are greater than the physical memory.
We hope the solution described above can solve your problems.