php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57638 memory size can't be larger than 30Mb
Submitted: 2007-04-26 17:46 UTC Modified: 2009-03-22 19:55 UTC
From: roberto at spadim dot com dot br Assigned: shire (profile)
Status: Closed Package: APC (PECL)
PHP Version: 5.2.1 OS: Linux 64bits archlinux 0.8
Private report: No CVE-ID: None
 [2007-04-26 17:46 UTC] roberto at spadim dot com dot br
Description:
------------
here is my php.ini (apc part):

extension=apc.so
apc.enable_cli=on
apc.optimization=on
apc.shm_size=64M
apc.mmap_file_mask=/tmp/apc.XXXXXX
apc.max_file_size=3M




Reproduce code:
---------------
here is my apc.php (from apc source) results:
General Cache Information
APC Version	3.0.14
PHP Version	5.2.1
APC Host	172.16.0.5
Server Software	Apache/2.2.4 (Unix) PHP/5.2.1
Shared Memory	1 Segment(s) with 30.0 MBytes
(mmap memory, file locking)
Start Time	2007/04/26 18:37:06
Uptime	0 minutes
File Upload Support	1

Runtime Settings
apc.shm_segments	1
apc.shm_size	64M
apc.slam_defense	0
apc.stat	1
apc.stat_ctime	0
apc.ttl	0
apc.user_entries_hint	4096


Expected result:
----------------
maybe linux don't allow more than 30mb?! i was expecting 64mb with 1 segment

Actual result:
--------------
30mb with 1 segment not 64mb!

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-04-26 18:01 UTC] wiesemann@php.net
(package selection corrected)
 [2007-04-26 18:15 UTC] wiesemann@php.net
> (package selection corrected)

now really ;-)
 [2007-11-25 22:40 UTC] shire@php.net
apc.shm_size doesn't accept values with the suffix 'M','G' or anything else.  It's using the default value of 30MB because it sees '64M' as invalid.  I'll try to add code to make this more flexible so you can input values such as 'M' and 'G' and warn on invalid values.  Try just '64' and it should work for you.
 [2008-12-01 11:43 UTC] melser dot anton at gmail dot com
I'm surprised this is still here...
I'd bet a fiver on the fact that your kernel.shmmax is still set to 32M max. Google for increasing your kernel.shmmax then check again.
 [2009-03-22 19:55 UTC] shire@php.net
*experimental* apc-4.x branch supports the G and M suffixes, I don't think I'll be back-porting support for this to apc-3.x unless there's a lot of interest in it.
 [2011-10-29 07:01 UTC] 1kenthomas at 1kenthomas dot com
As of today,  v. 3.1.3.x is still shipping with Ubuntu 11.10 while there are setup examples using "M".  Just a FYI;  it would be a service to backport,  and it would be a service to have v4 in current distros.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 27 15:01:29 2024 UTC