php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59144 HTTP processes grow until Apache crashes
Submitted: 2010-04-02 11:10 UTC Modified: 2013-02-18 00:35 UTC
From: mclough at exelentia dot com Assigned:
Status: No Feedback Package: APC (PECL)
PHP Version: 5.3.2RC3 OS: Apache/2.2.3 (CentOS)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mclough at exelentia dot com
New email:
PHP Version: OS:

 

 [2010-04-02 11:10 UTC] mclough at exelentia dot com
Description:
------------
Very quickly the HTTPD processes grow and I can see them 
taking up 5%, then 15%, 30%, 50% CPU. without APC, HTTPD 
processes were always 0%-1%. After a while, the server will 
no longer serve web pages and will need to be restarted. I 
do not know what the exact "error" is because I am not 
technical enough. I can still ping the server.

I use APC for Opcode cache but also for user caching. I have 
set shm_size to 768. Within a few hours user cache grows to 
15,000+ with about 3 hits per second. There will usually be 
about 400mb of memory still free, and about 25% 
fragmentation.

Now that I am aware of the problem, as a temporary solution 
I usually restart Apache a few times per day - this prevents 
the HTTPD processes taking up too much CPU and slowing down 
the pages / blocking pages altogether.

I originally installed APC 3.0.19 and this problem was 
happening much faster. So I upgraded to the latest PHP and 
APC versions. Also, before, I used to cache objects with 25 
minute expiry time. Then I read that APC did not like short 
expiries so I stopped caching these objects. All the objects 
I cache now have 1 week expiry time, so this is not the 
issue.

Any ideas as to what is causing the problem? Is it the type 
/ size / number of objects I am caching? Or a bug in APC?

Thanks for any help!
I'm sorry I can't provide a backtrace, I am not very 
technical and couldn't understand how it is done.. :-(

Mel

PHP is 5.3.2 (not quite right in dropdown)

apc.cache_by_default	On
apc.canonicalize	Off
apc.coredump_unmap	Off
apc.enable_cli	Off
apc.enabled	On
apc.file_md5	Off
apc.file_update_protection	2
apc.filters	no value
apc.gc_ttl	3600
apc.include_once_override	Off
apc.lazy_classes	Off
apc.lazy_functions	Off
apc.max_file_size	1M
apc.mmap_file_mask	/tmp/apc.9PyB6Q
apc.num_files_hint	2048
apc.preload_path	no value
apc.report_autofilter	Off
apc.rfc1867	Off
apc.rfc1867_freq	0
apc.rfc1867_name	APC_UPLOAD_PROGRESS
apc.rfc1867_prefix	upload_
apc.rfc1867_ttl	3600
apc.shm_segments	1
apc.shm_size	768
apc.stat	On
apc.stat_ctime	Off
apc.ttl	7200
apc.use_request_time	On
apc.user_entries_hint	12288
apc.user_ttl	7200
apc.write_lock	On



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-07-02 09:12 UTC] kalle@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.

Hopefully the above auto message should contain links on how to generate a backtrace, else a page explaining that is available at:

http://bugs.php.net/bugs-generating-backtrace.php

Simply attach gdb to the process and execute :)
 [2013-02-18 00:35 UTC] pecl-dev at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Mon May 23 23:05:47 2022 UTC