Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8254175
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T01:06:20+00:00 2026-06-08T01:06:20+00:00

I have big data portions to cache in APC (normal file caching is too

  • 0

I have big data portions to cache in APC (normal file caching is too slow). apc_store function always return false for this amount of data:

I tried to do something like this:

ini_set('apc.max_file_size', '128M');
die(ini_get('apc.max_file_size'));

And the output is 1M! It doesn’t throw any error, but it simply doesn’t work. All other ini_sets I have (eg. memory_limit) are working well, so it’s not permissions issue.

My APC info is:

Version 3.1.3p1
MMAP Support Enabled
MMAP File Mask no value
Locking type pthread mutex Locks
Revision $Revision: 286798 $
Build Date Apr 18 2010 06:56:17

and settings are:

apc.cache_by_default On
apc.canonicalize On
apc.coredump_unmap Off
apc.enable_cli Off
apc.enabled On
apc.file_md5 Off
apc.file_update_protection 2
apc.filters no value
apc.gc_ttl 3600
apc.include_once_override Off
apc.lazy_classes Off
apc.lazy_functions Off
apc.max_file_size 1M
apc.mmap_file_mask no value
apc.num_files_hint 1000
apc.preload_path no value
apc.report_autofilter Off
apc.rfc1867 Off
apc.rfc1867_freq 0
apc.rfc1867_name APC_UPLOAD_PROGRESS
apc.rfc1867_prefix upload_
apc.rfc1867_ttl 3600
apc.shm_segments 1
apc.shm_size 128
apc.stat On
apc.stat_ctime Off
apc.ttl 0
apc.use_request_time On
apc.user_entries_hint 4096
apc.user_ttl 0
apc.write_lock On

What should I set to allow caching such big data potions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T01:06:22+00:00Added an answer on June 8, 2026 at 1:06 am

    Following @Ugo Meda’s comment, I want to share with you my solution of this problem. As he correctly pointed out, that I couldn’t set APC settings (ie. apc.max_file_size) via ini_set. It simply returns false while other settings (ie. memory_limit) work well!

    So the only thing I could do was to set it directly in apc.ini. Location of this file on Ubuntu is:

    /etc/php5/conf.d/apc.ini
    

    Sometimes your APC settings are in php.ini in [APC] section – location of this file on Ubuntu is:

    /etc/php5/apache2/php.ini
    

    If you can’t find it, simply run this command:

    find / -name apc.ini
    

    If there is no such file (apc.ini) try to look for php.ini and [APC] section there:

    find / -name php.ini
    

    Once you find correct configuration file you are ready to edit it’s options. I simply added this two lines there:

    apc.shm_size=512
    
    apc.max_file_size=128M
    

    After editing, save it and simply restart your Apache (Ubuntu – /etc/init.d/apache2 restart). If for some reason you can’t run this command, or you don’t have permissions to mentioned *.ini files, then add sudo command on the beginning of each command above.

    One more note about apc.shm_size:

    If version of your APC is lower than 3.1.4, then value of this config option must be written in the same format as I wrote (no ‘M‘ at the end). If your version is 3.1.4 or higher, then you need to specify it in this way: 512M.

    Source: http://e-mats.org/2010/10/apc_mmap-mmap-failed-cannot-allocate-memory/

    @Ugo Meda’s – thanks again for pointing this out to me!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written a function that sorts a big scale of data. To test
Imagine you have a big file stored in hdtf which contains structured data. Now
Suppose that you have a big Data Entry Web Application Like Microsoft CRM ,
I'm struggling with the following. If have a (big) data frame with the following:
I have been running around here and there on NoSQL big data storage technologies.
I have been playing around with using graphs to analyze big data. Its been
I have very very big html page/data. I need to fetch data under h1
I have a big problem dealing with data I try to download in my
I have a big chunk of HTML which is a template for some data
I have an element which may contain very big amounts of data, but I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.