APC: Warming the bytecode cache with preload_path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Greetings,

APC has an INI setting named apc.preload_path which I assume causes all PHP
files within that path to be compiled and cached by APC as it is
initialized. The documentation is nonexistent, but in this thread Rasmus
corroborates my assumption (well, he doesn't invalidate it in any case):

    http://www.serverphorums.com/read.php?7,259956

I have enabled APC. I have restarted Apache many times. I have tried the
command-line in which I am able to force APC to compile and cache files. APC
is working flawlessly otherwise, caching compiled bytecode across requests.
However, I cannot get any preloading to occur. I have also verified that the
directory I am setting in the INI a) exists and b) matches the source files
that APC ends up caching dynamically.

Is there some other undocumented setting I have to enable beyond the path?

The reason I need this is that when we push a new version of our site live
and restart Apache, we get a few random fatal errors due to our 48M memory
limit setting as APC forces the request threads to compile the scripts
themselves. One of the larger pages on our site requires 29M of bytecode.
Yes, I know that's insane. Part of it is Zend Framework but the vast
majority is our data layer which will take some time to deconstruct to be
more modular.

I would create scripts to manually compile the larger scripts immediately
after restarting Apache, but by then it's too late. We'll have received a
few requests that die. Is there another creative solution I'm missing?

Thanks,
David

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux