APC no longer working

shadowq

Verified User
Joined
Dec 5, 2010
Messages
79
Hello,

I've been using APC for the last 6-12 months, and everything has been working great. However, I looked this morning, and the opcode cache for APC was empty (well, it has one file in there- which I assume is APC.php itself). I tried restarting apache, directadmin, and even restarted the server.

Upon closer look at APC (through apc.php), it continually shows the uptime as 0 minutes, and shows the "Start time" as the current time (the time the page was refreshed). So it looks like the cache is being restarted continually? I then had a look at top, and have been watching the apache/httpd processes- it appears that the child processes are being terminated rather quickly (within a few seconds of CPU time). I don't remember this being the case previously?

I tried updating apc from 3.1.9 to the latest, following http://help.directadmin.com/item.php?id=400.

PHP 5.3.14
APC 3.1.14
Apache 2.2.22
DirectAdmin 1.42.1

I don't believe I've changed anything else that should case this.

Any help would be greatly appreciated!

Thank you,
Jarrod.
 
I just restarted apache again, and the cache was working! However, after another restart, it's back to uptime = 0 minutes, and all of the above symptoms!
 
I'm very confused by this now- it seems to be a hit and a miss situation. Why would it work sometimes, and not others?
 
Thanks for the reply Alex. However, the problem persisted before upgrading. Any other ideas?

Cheers,
Jarrod.
 
I've downgraded to the stable release, and things seem fine again. Should I be worried about the strange behaviour though?

Build options are-

Code:
# ./build options
mail-header-patch=yes is set in the options.conf, but is not required with this php version.
To enable the X-Mail header, set mail.add_x_header to 1 in your php.ini
Apache: 2.2.22
Dovecot: 2.1.7
AWstats: no
Exim: no
exim.conf update: no
SpamAssassin: no
ClamAV: no
ClamAV: no
MySQL: no
MySQL backup: yes
MySQL backup directory: /usr/local/directadmin/custombuild/mysql_backups
PHP: 5.3.14 as CLI with mail() header patch
phpMyAdmin: 3.5.1-all-languages
ProFTPD: no
Pure-FTPd: no
Atmail webmail: no
RoundCube webmail: 0.7.2
Replace "php.ini" with './build all' and './build php-ini': no
Auto updates/notifications: no
Run "clean" every time: yes
Run "clean_old_webapps" every time: yes
Run "clean_old_tarballs" every time: no
Show texts in bold: yes
SquirrelMail: 1.4.22
UebiMiau: no
Zend Optimizer: 3.3.3
ionCube loader: no
 
OK, the versions seem to be fine.
What are the APC extension`s settings in your php.ini? Do you have enough free RAM for running APC?
What are the other PHP extensions which are loaded into PHP?
Did you try to contact with APC developers?
 
Thanks again for your reply Alex. APC seems to be functioning correctly now, and hasn't missed a beat for the last week. Should I just chalk it up to a coincidence?

Nevertheless, the answers to your questions are below.

APC settings in php-
Code:
apc.enabled=1
apc.shm_size=1536M
apc.ttl=7200
apc.user_ttl=7200
apc.enable_cli=0

And yep, I've allocated 8GB to that VPS- plenty for directadmin + APC.

I don't really have any other PHP extensions.

And no, I haven't made contact with APC developers. Think I might leave it for now as it seems to be working happily.

Thanks again for your help!
 
Back
Top