APC has been running for 1 sec. Currently caching 4 entries (150 kbytes).

This is the message I receive in status. Why 1 sec and why 4 entries and how can I solve this?

Comments

keva’s picture

It's not clear exactly what the issue is, but I suspect you find APC is restarting regularly, and the opcode cache is wiped out.

The solution for me was here:
http://forums.cpanel.net/f5/why-apache-restarting-every-two-hours-254022...

in WHM > Apache Configuration > Piped Log Configuration > check to enable Piped Log Configuration

CPJS’s picture

Doesn't seem to be the root of the problem. Still 1 sec and still 4 entries.

Also in Drupal's performance logs:

Showing all 0 paths.
Average memory per page: n/a MB
Average duration per page: n/a ms
Total number of page accesses: 0
First access: Fri, 06/22/2012 - 11:04.
Last access: Thu, 01/01/1970 - 02:00.
Data source: APC (switch to database)

No statistics available yet.

Heine’s picture

What entries are cached? Do you happen to clear caches on all requests?

(See the APC.php app that comes with the APC install to easily check cache entries)

CPJS’s picture

I'll check apc.php. Meanwhile this is from phpinfo();

apc

APC Support enabled
Version 3.1.8
APC Debugging Disabled
MMAP Support Enabled
MMAP File Mask no value
Locking type pthread mutex Locks
Serialization Support php
Revision $Revision: 308812 $
Build Date Dec 27 2011 18:06:45

Directive Local Value Master Value
apc.cache_by_default On On
apc.canonicalize On On
apc.coredump_unmap Off Off
apc.enable_cli Off Off
apc.enabled On On
apc.file_md5 Off Off
apc.file_update_protection 2 2
apc.filters no value no value
apc.gc_ttl 3600 3600
apc.include_once_override Off Off
apc.lazy_classes Off Off
apc.lazy_functions Off Off
apc.max_file_size 1M 1M
apc.mmap_file_mask no value no value
apc.num_files_hint 1000 1000
apc.preload_path no value no value
apc.report_autofilter Off Off
apc.rfc1867 On On
apc.rfc1867_freq 0 0
apc.rfc1867_name APC_UPLOAD_PROGRESS APC_UPLOAD_PROGRESS
apc.rfc1867_prefix upload_ upload_
apc.rfc1867_ttl 3600 3600
apc.serializer default default
apc.shm_segments 1 1
apc.shm_size 100M 100M
apc.slam_defense On On
apc.stat On On
apc.stat_ctime Off Off
apc.ttl 0 0
apc.use_request_time On On
apc.user_entries_hint 4096 4096
apc.user_ttl 0 0
apc.write_lock On On
zambrey’s picture

I had this kind of thing on one of my installations.
Seems that APC is not working properly on some of PHP instances.

In my case I had to switch to mod_fastcgi.
Following article helped me understand this problem:
http://www.brandonturner.net/blog/2009/07/fastcgi_with_php_opcode_cache/

Hope it helps.

CPJS’s picture

In "User Cache Entries" there is no file cached.
In "Pre-directory Entries" there is the public_html folder
In "System Cache Entries" there is only apc.php

Also in "View Host Stats" there is 1 cached files with 1 hit and 1 miss.
99.7 MBytes free and 346KB used.

Heine’s picture

This means your server configuration is the problem, not the APC drupal module.

Check whether your server is using the "CGI" server method via the status report ("more information" on PHP, see the field Server API). If it's not CGI check whether your server processes are crashing on each request.

CPJS’s picture

Thanks for your help. I'll look into it further. I didn't know where to start looking.

R.Muilwijk’s picture

Status: Active » Closed (won't fix)