|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59275 High CPU usage when apache runs out of file handles
Submitted: 2010-06-21 05:14 UTC Modified: -
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: andy dot rigby at cybertill dot co dot uk Assigned:
Status: Open Package: memcache (PECL)
PHP Version: 5.2.11 OS: RHEL5
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:
Bug Type:
From: andy dot rigby at cybertill dot co dot uk
New email:
PHP Version: OS:


 [2010-06-21 05:14 UTC] andy dot rigby at cybertill dot co dot uk
Runing version 3.0.4 beta
Using memcache session save handler. Prefork apache.

We had an instance where after adding additional virtual host entries (with inidividual log files) after an apache restart CPU hit 100% for each running apache process. 

After running gdb, found a backtrace was always stuck in mmc_pool_select() or mmc_pool_run(). I can't quite remember which - unfortunately I did not save the backtrace and currently failing to reproduce in our dev. environment. I found this blog that has the exact same symptoms: which provides analysis of problem area.

Although this is ultimately a configuration problem (lack of file handles), it would be good if memcache could catch this and not use 100% cpu, which brings down the server.

Reproduce code:
Unable to reproduce at the moment, though I suspect ulimit -n for the apache process + combination of memcache seession handler will do it.

-- memcache.ini --



Expected result:
An error about memcache not being able to obtain a file handle, not high cpu.

Actual result:
100% cpu for each httpd process doing a session_start()


Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Jan 27 18:01:24 2021 UTC