Edgewall Software
Modify

Opened 15 years ago

Closed 14 years ago

#9407 closed defect (worksforme)

Severe memory issues/leaks.

Reported by: josh@… Owned by:
Priority: normal Milestone:
Component: general Version: 0.11-stable
Severity: major Keywords: needinfo
Cc: andcos84@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Remy Blank)

My company has Trac and SVN set up to use locally for our internal development. However, we're having issues whereby Trac's memory usage is slowly building up over a period of around 1-3 days, to the point where it consumes all available RAM, forcing us to restart Apache, or worse, do a hard-reboot of the server.

Running top reveals that it's the httpd (Apache) processes which are eating the RAM. They are also gradually increacing their CPU usage, to the point where the machine is generally idling at around ~10% cpu.

The Swap partition is also not being utilised much, suggesting(?) the actual cause of the slowdown is probably thrashing.

Obviously, this is not ideal, and we'd quite like to identify the cause of the problem and fix it ASAP.

Details of the setup are:

  • Machine
    • OS: Virtualised Fedora 12 64-bit Linux
    • Memory: 1Gb
    • Swap: 2Gb
    • CPU: Intel 2.4GHz Dual-core
  • Software
    • Apache: 2.2.14
    • Python: 2.6.2
    • Trac: 0.11.7
    • SVN: 1.6.9
    • mod_wsgi: 3.1
  • Apache
    • Running 10 instances. (i.e. Whatever that build defaults to, since I didn't configure that.)

With the exception of Trac and it's plugins, all the software is installed from the Fedora repos. Trac and plugins are installed from source.

There's no other signficant software running on that server, so it's fairly certain that Trac is the cause.

We're quite happy to provide more details/feedback if it helps solve this issue.

Attachments (1)

trace.txt (161.6 KB ) - added by josh@… 15 years ago.
strace on httpd process

Download all attachments as: .zip

Change History (7)

comment:1 by Remy Blank, 15 years ago

Description: modified (diff)

Can you try to strace the apache processes idling at 10%? That may give an indication about what't they are doing.

As a workaround, you could run mod_wsgi in daemon mode, and limit the number of requests before restarting the process (see the maximum-requests argument to WSGIDaemonProcess).

comment:2 by Christian Boos, 15 years ago

Also, try running Trac without any plugins. If there's no issues when no plugin are used, reintroduce them one by one, in order to find the culprit.

by josh@…, 15 years ago

Attachment: trace.txt added

strace on httpd process

comment:3 by josh@…, 15 years ago

I've attached the output of running strace on one of the httpd child processes. It's worth noting that it's no one process that is eating 10% of the CPU, that's spread across 8-16 processes.

Tweaking the MPM settings for the prefork Apache module (not mod_wsgi, haven't gotten around to that yet) seems to slow the problem down, but hasn't stopped it yet. Will try running WSGI in demon mode next.

comment:4 by andcos84@…, 15 years ago

Cc: andcos84@… added

comment:5 by Christian Boos, 14 years ago

Keywords: needinfo added

You should try to upgrade to 0.12-stable, the fixes for #9111 should also prove effective in your situation.

comment:6 by Christian Boos, 14 years ago

Resolution: worksforme
Status: newclosed

No feedback in more than 3 months, closing.

Probably fixed by r10002 and friends.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.