Solved

apc.shm_segments setting ignored in MMAP mode

Posted on 2011-02-22
6
2,079 Views
Last Modified: 2013-12-13
Hi there:

This is an error message I am getting in my apache log file:

PHP Warning:  PHP Startup: apc.shm_segments setting ignored in MMAP mode in Unknown on line 0

I have my php.ini file APC as follows:

extension=apc.so
[apc]
apc.ttl="7200"
apc.user_ttl="7200"
apc.shm_segments="3"
apc.shm_size="32"

May that be related to an error in my config file?

Thank you very much in advance.

Javier Faus
0
Comment
Question by:javierfaus
  • 3
  • 3
6 Comments
 
LVL 14

Accepted Solution

by:
svgmuc earned 125 total points
ID: 35006154
From http://php.net/manual/en/apc.configuration.php

When APC is compiled with mmap support (Memory Mapping), it will use only one memory segment, unlike when APC is built with SHM (SysV Shared Memory) support that uses multiple memory segments. MMAP does not have a maximum limit like SHM does in /proc/sys/kernel/shmmax. In general MMAP support is recommeded because it will reclaim the memory faster when the webserver is restarted and all in all reduces memory allocation impact at startup.
0
 

Author Comment

by:javierfaus
ID: 35011103
So if my APC is working in MMAP mode I just set the apc.shm_segments="1", is it?

Thanks in advance.
Javier.
0
 
LVL 14

Expert Comment

by:svgmuc
ID: 35011370
Yes, that's the only acceptable setting.
0
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 

Author Comment

by:javierfaus
ID: 35023305
Hi svgmuc:

Thanks for your help here. Is there any way to make sure my APC is actually configured to use MMAP? I would say it is because of the error message but still not 100% sure.

Thanks a lot for your support in this one.
Javier.
0
 

Author Closing Comment

by:javierfaus
ID: 35205380
Just partial answer.
0
 
LVL 14

Expert Comment

by:svgmuc
ID: 35206334
The error would not show if not in MMAP mode.
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Scope of $_SESSION 17 39
How do you answer a question about coding in a way that accommodates high traffic? 6 34
PHP and google maps 13 43
Showing random records from database 10 36
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question