When Apache fails to start, the following error is reported:
[Tue Mar 20 12:17:27 2012] [emerg] (22) invalid argument: cocould not call shmget
If the kernel sysvipc is not enabled, check that the configuration file is enabled.
It is also said that the shmmax parameter is deterrent and takes effect through sysctl-P. It is found that the parameter value is too large by using the method. After modification, the shmmax parameter can be started normally.
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.