As far as I can tell, APC logging with APC compatability mode in Zend Server CE doesn't work. I am currently debugging this on a D6 site right now, but I have also seen the problem on a D7 site.

I am pretty sure the problem has to do with performance_apc_list_all(), which calls apc_cache_info('user') to get all of the data. This function exists in compatability mode, but just returns an empty array. So, my guess is that stats are being stored, but there is no decent way to get them out of the cache.

If there is enough interest, I maybe able to take on adding support for using the Zend Data Cache API to the D7 version.

I will also try to roll up a patch for the D6 and D7 versions to detect APC compatability mode and not allow APC logging to be enabled.

CommentFileSizeAuthor
#5 performance.patch19.41 KBmpdonadio

Comments

malc0mn’s picture

Personally I would find it really nice if we could fully support the very common APC caching mechanism to be able to service as many people as possible with this module.

Have you tried running the apc.php page on such a setup to verify that there is anything in the cache (though I think it uses the same methods to retrieve the data :s)? This page is included in the APC distribution, or you can install the prod_check module and navigate to /admin/reports/status/apc to view the same page (for advanced options you need to setup a user and pass in /admin/settings/prod-check [=D6 path]).

mpdonadio’s picture

apc.php doesn't work on Zend Server with APC compatability mode running. It relies on apc_cache_info() to get the stats. prod_check doesn't think that APC is running, but the standard status page does.

The problem is that the apc_cache_info() exists, but just returns an empty array. Other than that, you can use apc_store() and apc_fetch() all you want in compatibility mode. You can also use apc_store() to stuff something in the cache, and then retrieve it with zend_shm_cache_fetch(). The problem is getting all keys out of the cache, which is what you can use apc_cache_info() for.

malc0mn’s picture

If this compatibility mode is detectable, we can fall back to the same way as we do with memcache now: make a separate entry with a fixed key in which we store all other keys. We can then pull that specific key and loop through the array to fetch all the other keys, if you follow...

mpdonadio’s picture

OK, so do you want me to add another "flavor" of logging (so there would be DB, APC, Memcache, and Zend Datacache) or try to patch the APC version to work with APC compatibility / Zend Datacache. I have been looking at the code, and I think adding a new flavor would be better in the long run. Also, I assume we would want changes to the D7 version and then assess whether it is worth it to backport to the D6 version?

mpdonadio’s picture

Version: 6.x-1.27 » 7.x-1.3
StatusFileSize
new19.41 KB

Here is a patch against 7.x-1.3. The patch

  • Adds in support for checking real APC versus Zend Datacache APC compatibility mode
  • Adds preliminary support for storing summary data in Zend Datacache, but further testing is likely needed.
  • Adds in created and updated fields to the summary data itself for cache engines that don't expose these.

I would be glad to continue to contribute to this project if you need/want help.

malc0mn’s picture

Assigned: Unassigned » malc0mn
Status: Active » Fixed

Patch applied, new releases available:

D6: http://drupal.org/node/1404428
D7: http://drupal.org/node/1404430

There was nothing to 'backport' to D6, so applied it (corrected patch fuzzyness ofcourse) there immediately as well.

Thanks for the contribution! Commit has been properly attributed ;-)

mpdonadio’s picture

Thanks, glad I could help.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.