Re: [PHP] Problem using APC

2008-09-11 Thread David Park
Hi Nathan,

Thanks for the advice.  I don't think that cache getting too full is the
problem because the system cache only got less than 10% full at the most.

On another note, thanks for letting me know about the PECL dev list.  I
didn't realize that that list exists.  I just sent my email to the PECL
list.  Maybe they can help me out there.

David

On Wed, Sep 10, 2008 at 11:17 PM, Nathan Nobbe [EMAIL PROTECTED]wrote:



 On Wed, Sep 10, 2008 at 11:38 PM, David Park [EMAIL PROTECTED] wrote:

 Hi All,

 I just installed APC on my server that is running PHP and the APC appears
 to
 be randomly crashing.  Below are the symptoms that my server is
 experiencing
 and the configuration of my system.  Has anyone seen this type of problem
 with APC and can you give me any advice to fix it?

 *Symptom #1 - APC appears to be stable but then restarts after a couple
 hours with no page requests*
 1. Reboot server
 2. Load apc.php.  It shows that the cache is empty except for one or two
 system files.  These are the files that are used to create the apc.php
 page.
 3. Load some other PHP pages.  And re-load apc.php after each pageview.
  The
 cache starts filling up with other cached items and the hit rate goes up.
 4. Leave the server alone for a couple hours.
 5. Load apc.php.  It shows that the cache is empty.  Also, the cache
 uptime
 is less than an hour - in other words, the cache appears to have restarted
 itself.


 just curious, but have you really seen a reset after a couple of hours of
 *inactivity* ?  i used to monitor apc.php closely when we deployed it at my
 last job and every time it got past the size of the cache limit; it would
 purge the cache.  i think thats very common.  how many files are you trying
 to cache?  we needed to allocate roughly 200MB of memory for apc on our
 production box to keep somewhere around 1000 files worth of opcode cache in
 memory.  obviously theres no standard for files but thats how it worked for
 us.

 you can write a test script (javascript) to run through and start
 requesting all the various files from your webserver; then apc will cache
 them, and you can see how many it can hold before the cache needs to be
 purged.


 *Symptom #2 - APC restarts in the middle of serving some pages*
 1. Reboot server
 2. Load apc.php.  It shows that the cache is empty except for one or two
 system files.  These are the files that are used to create the apc.php
 page.
 3. Load some other PHP pages.  And re-load apc.php after each pageview.
  The
 cache starts filling up with other cached items and the hit rate goes up.
 4. On some of the PHP pages, however, apc.php shows that the cache has
 emptied and has started again.


  the only reason i know apc would purge the cache is reaching the limit on
 cache size and then getting requests to cache new files.  there may be other
 reasons it will automatically purge itself, and that could be something
 worth asking on an apc dev list.  one thing you might try is adding some
 user variables to the cache via the apc api, http://us.php.net/apc, maybe
 you could check to see if those get cleared along w/ the opcode cache.  i
 dunno if it really matters, but it could be interesting.

 -nathan



[PHP] Problem using APC

2008-09-10 Thread David Park
Hi All,

I just installed APC on my server that is running PHP and the APC appears to
be randomly crashing.  Below are the symptoms that my server is experiencing
and the configuration of my system.  Has anyone seen this type of problem
with APC and can you give me any advice to fix it?

*Symptom #1 - APC appears to be stable but then restarts after a couple
hours with no page requests*
1. Reboot server
2. Load apc.php.  It shows that the cache is empty except for one or two
system files.  These are the files that are used to create the apc.php page.
3. Load some other PHP pages.  And re-load apc.php after each pageview.  The
cache starts filling up with other cached items and the hit rate goes up.
4. Leave the server alone for a couple hours.
5. Load apc.php.  It shows that the cache is empty.  Also, the cache uptime
is less than an hour - in other words, the cache appears to have restarted
itself.

*Symptom #2 - APC restarts in the middle of serving some pages*
1. Reboot server
2. Load apc.php.  It shows that the cache is empty except for one or two
system files.  These are the files that are used to create the apc.php page.
3. Load some other PHP pages.  And re-load apc.php after each pageview.  The
cache starts filling up with other cached items and the hit rate goes up.
4. On some of the PHP pages, however, apc.php shows that the cache has
emptied and has started again.

*System Configuration
*1. OS: FreeBSD amd64
2. PHP v. 4.4.8
3. APC v. 3.0.19
4. Shared Memory: 128MB, 1 segment, mmap memory, file locking

David


[PHP] APC vs. eaccelerator?

2008-08-25 Thread David Park
Hi All,

I currently run a phpBB site using phpBB v. 2.0.22 and PHP4.  We'd like to
install either APC or eaccelerator to speed up the site's performance.  I'm
not sure whether we should choose APC or eaccelerator since I'm a newbie to
PHP caching.

Which do you think is better - APC or eacclerator?  Here are some criteria
that I'd like to use in evaluating APC vs. eacclerator: 1) compatibility, 2)
stability and 3) speed.

Some older posts on the net (from 2006) complained about incompatibilities
between APC/eacclerator and phpBB and about crashes of APC/eacclerator.  I'm
hoping that these problems have been cleared up by now.

Thanks for your help!

David