php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56136 APC does not work on SMP system
Submitted: 2004-07-20 18:39 UTC Modified: 2004-10-14 16:14 UTC
From: info at litespeedtech dot com Assigned:
Status: Closed Package: APC (PECL)
PHP Version: 4.3.3 and above OS: Linux 2.4 Kernel
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: info at litespeedtech dot com
New email:
PHP Version: OS:

 

 [2004-07-20 18:39 UTC] info at litespeedtech dot com
Description:
------------
APC works fine on uniprocessor system, but on our 2 CPU SMP system it fails.
Got the following in stderr 
[apc-error] apc_shm_attach: shmat failed: Cannot allo
cate memory

Best regards,
George Wang
http://www.litespeedtech.com


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-08-18 11:54 UTC] anonymous at anonym dot com
probably unrelated to SMP, I've tested it successfully on a dual Opteron and a dual Xeon system.

Best Regards
 [2004-09-07 00:30 UTC] rasmus@php.net
I run it on plenty of SMP systems as well.  We'll need some more detailed info to do anything here.
 [2004-09-07 13:50 UTC] info at litespeedtech dot com
If you do not mind, please try our litespeed web server at http://www.litespeedtech.com/, the pre-built APC binary works fine on uni-processor system, but failed on SMP system.

Redhat 8 with kernel 2.4.22smp kernel is used on our test machine. And we had test it on a dual opteron with 2.6 kernel as well as on a dual Sun Ultra 60 with Solaris 8. 
All are failed. 

I am not sure what we did wrong as we followed the instruction to built apc.so

Thanks,
George Wang
 [2004-10-14 15:07 UTC] info at litespeedtech dot com
Feature it out finally, it is because the maximum memory size of PHP process is limit to 30M and APC want to allocate 30M shared memory by default. :-)
 [2004-10-14 15:11 UTC] gschlossnagle@php.net
APCs shared memory usage shouldn't go against php's 
memory limit.  Most likely your kernel setting shmmax is 
under configured.  Do

sysctl kernel.shmmax

Likely it's below what you're asking APC to allocate 
(30M by default)/
 [2004-10-14 16:14 UTC] info at litespeedtech dot com
shared memory usage probably does not counted for process memory usage on an uniprocessor system, but it does on a SMP system, because APC works with the same process memory limit on an uniprocessor system. 
After we rise the process memory limit, APC successfully allocate 30M shared memory.

result of command "sysctl kernel.shmmax" on our SMP linux box is 32M. :-)
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sat Feb 16 00:01:26 2019 UTC