Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

My VPS server has Centos 5 box running PHP 5.2.17 with a dso handler, as well as Apache 2.2.21.

I attempted to install the APC PHP accelerator v3.1.9 on the server, but it left my site unaccessible.

From the command prompt, typed pecl install apc; this did the installation of APC and configured my php.ini file with various APC settings.

These are the settings that I ended up using:

apc.enabled = 1
apc.shm_segments = 1
apc.shm_size = 2M
apc.optimization = 0
apc.num_files_hint = 512
apc.user_entries_hint = 1024
apc.ttl = 60
apc.user_ttl = 0
apc.gc_ttl = 600
apc.cache_by_default = 1
apc.filters = "apc\.php$"
apc.slam_defense = 0
apc.use_request_time = 1
apc.mmap_file_mask = /tmp/apcfm.XXXXX
;OR apc.mmap_file_mask = /dev/zero
apc.file_update_protection = 2
apc.enable_cli = 0
apc.max_file_size = 2M
apc.stat = 1
apc.write_lock = 1
apc.report_autofilter = 0
apc.include_once_override = 0
apc.rfc1867 = 0
apc.rfc1867_prefix = "upload_"
apc.rfc1867_name = "APC_UPLOAD_PROGRESS"
apc.rfc1867_freq = 0
apc.localcache = 1
apc.localcache.size = 512
apc.coredump_unmap = 0
apc.stat_ctime = 1

Unfortunately, after I restarted apache after making this change, I found that I was unable to access my site.

When I attempted to restart apache to fix the issue, I got the following error:

httpd not running, trying to start
(98)Address already in use: make_sock: could not bind to address
no listening sockets available, shutting down
Unable to open logs

I figured that apache must have hung in some horrible way, so I used top to get the process id and kill -9 pid to kill it. I was able to restart apache, but I found that I still could not access my site.

I was able to get things working by commenting out these lines and disabling apc:

apc.enabled = 1

So it looks like it was the APC installation that caused the Apache process to hang.

My questions are:

1. Why did the APC installation cause this?

2. What my I have done wrong or missed in my installation that could have caused this?

Please let me know if there's any more information I can provide to help to resolve this.

share|improve this question
Did you take a look at the error log? –  quanta Aug 9 '12 at 5:25
I did, but this was all I saw after killing/restarting apache: pid file /usr/local/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run? –  Tola Odejayi Aug 9 '12 at 6:05
I mean is there any interesting in the error when you was unable to access? –  quanta Aug 9 '12 at 6:12
Frustratingly, no, there wasn't. –  Tola Odejayi Aug 9 '12 at 6:26
Actually, I did see this: seg fault or similar nasty error detected in the parent process –  Tola Odejayi Aug 9 '12 at 6:56
show 2 more comments

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.