Opened 12 years ago

Closed 8 years ago

#482 closed defect (fixed)

RAILS server leaking memory

Reported by: writetodan@… Owned by: steve@…
Priority: major Milestone:
Component: admin Version:
Keywords: memory leak rails errors Cc:

Description

server rails processes (lighttpd / fastcgi) are leaking memory at approx 10MB per minute on www.

simple tests on dev.openstreetmap.org show similar memory leaks with simple loops doing XML output via REXML or ruby-libxml.

ruby-libxml has known memory leaks: http://rubyforge.org/tracker/index.php?func=detail&aid=7945&group_id=494&atid=1971

it also appears that certain versions of ruby, or perhaps ruby compiled with certain gcc versions, has leaks:

http://fredbrunel.com/journal/2006/12/trouble-with-rails-and-ruby-185/

the post indicates that building ruby with gcc4 is problematic - rolling back to gcc3.3 and re-installing might help.

replies to that post also indicate that installing fastthread via gem might help:

http://moonbase.rydia.net/mental/blog/programming/fastthread.html

sudo gem install fastthread

this problem has knock-on effects in that periodic restarting of server processes might be contributing to 500 errors seen using server.

Attachments (2)

libxml-leak1.patch (44.4 KB) - added by Tom Hughes 12 years ago.
Patch for ruby libxml wrapper to stop leak adding nodes to a document
libxml-leak2.patch (635 bytes) - added by Tom Hughes 12 years ago.
Patch for ruby libxml wrapper to stop leak turning DOM tree into text

Download all attachments as: .zip

Change History (4)

Changed 12 years ago by Tom Hughes

Attachment: libxml-leak1.patch added

Patch for ruby libxml wrapper to stop leak adding nodes to a document

Changed 12 years ago by Tom Hughes

Attachment: libxml-leak2.patch added

Patch for ruby libxml wrapper to stop leak turning DOM tree into text

comment:1 Changed 12 years ago by Tom Hughes

Component: rails_portadmin

comment:2 Changed 8 years ago by Tom Hughes

Resolution: fixed
Status: newclosed

Long since fixed...

Note: See TracTickets for help on using tickets.