Bug #61008 [Fbk->NoF]: not enough shared memory left
Edit report at https://bugs.php.net/bug.php?id=61008&edit=1
ID: 61008
Updated by: php-bugs@lists.php.net
Reported by: shenkong at qq dot com
Summary: not enough shared memory left
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: Semaphore related
Operating System: CentOS 6.0
PHP Version: 5.3.10
Assigned To: cmb
Private report: N
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2021-07-19 11:02:39] cmb@php.net
Is this still an issue with any of the actively supported PHP
versions[1]?
[1] <https://www.php.net/supported-versions.php>
------------------------------------------------------------------------
[2012-02-08 10:32:32] shenkong at qq dot com
Description:
------------
i run the code below in the cmd, it tooks warning Warning: shm_put_var(): not
enough shared memory left in
/usr/local/agent/bin/a.php on line 15
i set the shmmax > 100M
when the process > 1 ,the error shows
when the process = 1, it seems ok.
Test script:
---------------
#!/usr/local/services/php/bin/php
<?php
// Example
$key = ftok(__FILE__, 'a');
$shm = shm_attach($key);
shm_remove($shm);
$shm = shm_attach($key);
for($i = 0; $i < 3; $i++) {
$pid = pcntl_fork();
if ($pid) {
} else {
//child
$pid = posix_getpid();
for($i = 0; $i < 100000; $i++) {
shm_put_var($shm, $pid, microtime(true));
}
exit;
}
}
?>
Actual result:
--------------
Warning: shm_put_var(): not enough shared memory left in
/usr/local/agent/bin/a.php on line 15
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=61008&edit=1
Thread (3 messages)