note 114711 added to function.shm-attach
| From: | DanielKnecht | Date: | Thu, 27 Mar 2014 11:30:32 +0000 |
| Subject: | note 114711 added to function.shm-attach | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-199054@lists.php.net to get a copy of this message | ||
If you get an error like "PHP Warning: shm_attach(): failed for key 0x61040bb5: Cannot
allocate memory" then you might need to tweak your shared memory configuration.
To see your system values, enter "sysctl kern.sysv."
Important values are kern.sysv.shmmax and kern.sysv.shmall:
* kern.sysv.shmmax is the max number of bytes one shared memory segment may have
* kern.sysv.shmall is the max number of memory pages all shared memory segments together can consume
One memory page is 4096 bytes, meaning that if you set kern.sysv.shmmax to 1073741824 (1GB) then
kern.sysv.shmall must be at least 262144 to be able to allocate a one GB memory segment (since
262144 * 4096 = 1073741824).
tl;dr The default values on some systems are very low and then it is not enough to only increase
kern.sysv.shmmax - also kern.sysv.shmall needs to be increased accordingly!
----
Server IP: 72.52.91.14
Probable Submitter: 141.192.169.43
----
Manual Page -- http://php.net/manual/en/function.shm-attach.php
Edit -- https://master.php.net/note/edit/114711
Del: integrated -- https://master.php.net/note/delete/114711/integrated
Del: useless -- https://master.php.net/note/delete/114711/useless
Del: bad code -- https://master.php.net/note/delete/114711/bad+code
Del: spam -- https://master.php.net/note/delete/114711/spam
Del: non-english -- https://master.php.net/note/delete/114711/non-english
Del: in docs -- https://master.php.net/note/delete/114711/in+docs
Del: other reasons-- https://master.php.net/note/delete/114711
Reject -- https://master.php.net/note/reject/114711
Search -- https://master.php.net/manage/user-notes.php