php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57791 Strange Cache Behavior
Submitted: 2007-08-19 14:00 UTC Modified: 2007-08-20 18:14 UTC
From: Brian dot White at foxfire74 dot com Assigned:
Status: Closed Package: APC (PECL)
PHP Version: 5_2 CVS-2007-08-19 OS: Windows
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: Brian dot White at foxfire74 dot com
New email:
PHP Version: OS:

 

 [2007-08-19 14:00 UTC] Brian dot White at foxfire74 dot com
Description:
------------
I upgraded to the version APC included in pecl-5.2.4RC2 this morning from qa.php.net and observed very unusual cache behavior.  Files are cached as usual but no files are served from the cache.  Neither hits or misses increases as the site is accessed.  After an over an hour I have 1 hit and 0 misses but the cache contains 196 files and is almost 20MB.  I don't understand how I can have 196 files in the cache but only 0 misses.  Performance timings show that files are not being served from the cache.

General Cache Information
APC Version 3.0.15-dev
PHP Version 5.2.4RC2
APC Host
Server Software Apache/2.2.4 (Win32) mod_ssl/2.2.4 OpenSSL/0.9.8e PHP/5.2.4RC2
Shared Memory 1 Segment(s) with 100.0 MBytes
(IPC shared memory, file locking)
Start Time 2007/08/19 11:14:25
Uptime 1 hour and 36 minutes
File Upload Support 1
File Cache Information
Cached Files 196 ( 19.4 MBytes)
Hits 1
Misses 0
Request Rate (hits, misses) 0.00 cache requests/second
Hit Rate 0.00 cache requests/second
Miss Rate 0.00 cache requests/second
Insert Rate 0.03 cache requests/second
Cache full count 0

When I revert to the version of APC from pecl-5.2.4RC2 the cache is populated and serves files normally.  In less than 2 minutes, I have over 1000 hits and (80 misses).

General Cache Information
APC Version 3.0.15-dev
PHP Version 5.2.4RC2
APC Host
Server Software Apache/2.2.4 (Win32) mod_ssl/2.2.4 OpenSSL/0.9.8e PHP/5.2.4RC2
Shared Memory 1 Segment(s) with 100.0 MBytes
(IPC shared memory, file locking)
Start Time 2007/08/19 13:02:26
Uptime 1 minute
File Upload Support 1
File Cache Information
Cached Files 80 ( 7.8 MBytes)
Hits 1323
Misses 80
Request Rate (hits, misses) 16.13 cache requests/second
Hit Rate 15.21 cache requests/second
Miss Rate 0.92 cache requests/second
Insert Rate 0.92 cache requests/second
Cache full count 0


Reproduce code:
---------------
I am browsing a site with WordPress 2.2.2.  APC configuration is below.

[APC]
apc.cache_by_default = 1
apc.enable_cli = 0
apc.enabled = 1
apc.file_update_protection = 2
apc.filters = "%%.*\.php"
apc.gc_ttl = 3600
apc.max_file_size = 1M
apc.num_files_hint = 1000
apc.optimization = 0
apc.shm_segments = 1
apc.shm_size = 100
apc.slam_defense = 0
apc.ttl = 7200
apc.user_entries_hint = 100
apc.user_ttl = 7200
apc.stat = 1
apc.write_lock = 1
apc.report_autofilter = 0
apc.include_once_override = 0
apc.localcache = 0
apc.localcache.size = 512


Expected result:
----------------
The cache should be populated and files served from the cache.

Actual result:
--------------
The cache is populated but no files are served.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-08-20 15:30 UTC] shire@php.net
My last commit may fix this, can you check the next build and report back if it works correctly?

Thanks...
 [2007-08-20 18:14 UTC] Brian dot White at foxfire74 dot com
Everything appears to be working normally using the latest build from CVS.  I do have some fragmentation in the cache which doesn't usually happen so soon after a restart; but files are definitely being cached and served from the cache.  I'll watch the cache closely for a while and reopen the bug report if I see the same unusual behavior; but the problem seems to be solved.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 22:01:27 2024 UTC