Opened 5 years ago

Closed 21 months ago

#229 closed defect (fixed)

Reching of var_cache RAM limit cause Apache to swap alot

Reported by: wips Owned by: moo
Priority: major Milestone: 3.0.1
Component: cacher Version: 1.3.0
Keywords: swap Cc: wips@…
Application: PHP Version: 5.2.9
Other Exts: SAPI: Irrelevant
Probability: Always Blocked By:
Blocking:

Description

We have 128M limit for variables cache. On some of our servers it may be reached sometimes. And after that happens Apache start slowly swapping on HDD until it reaches max swap size (16G) allowed by OS, which causing unpredictable server behavior.

One interesting thing about it, is that swap grows to its limit when server isn't loaded (we have pure night traffic and high load at work time). But while server is under high load, everything works approximately as it should be. You can see this situation on a picture below (it's an MRTG graph of free/used memory).

At present time problem solved by rolling back to 1.2.2 version, but it has other bug - http://xcache.lighttpd.net/ticket/152, which is critical for us too.

System params: FreeBSD 7.1, PHP 5.2.9, XCache 1.3.0 (1.2.2), RAM - 4G, max swap size - 16GB, Apache 2.11.

http://img690.imageshack.us/img690/7168/vmspweek.png

Change History (7)

comment:1 Changed 5 years ago by moo

  • Status changed from new to accepted

could it be that XCache coredump, and it take some time to genreate the dump? can u try to make a gdb backtace?

btw, #152 can be fixed using the modify mentioned in comments.

comment:2 Changed 5 years ago by wips

There were not any coredump, not XCache nor Apache. So I can not give u a
backtrace. Thx for 152 bug solution. It works. Ask if you need any other
information.

comment:3 Changed 5 years ago by wips

As you wrote I tried to use top with M command, which wasn't recognized. In "man top" I hadn't find any information about M.
Anyway I'll try to find most memory hungry process in some different way. I'll write as soon as I'll get any data.

comment:4 Changed 2 years ago by moo

  • Milestone changed from 1.3.3 to 2.0.1

Milestone 1.3.3 deleted

comment:5 Changed 2 years ago by moo

  • Status changed from accepted to new

comment:6 Changed 2 years ago by moo

  • Status changed from new to assigned

need to reproduce

comment:7 Changed 21 months ago by moo

  • Resolution set to fixed
  • Status changed from assigned to closed

Assuming this bug is fixed as apache use worker (threaded) by default while thread safety bug is fixed in svn for 3.0.1

Note: See TracTickets for help on using tickets.