Ticket #1345 (closed enhancement: fixed)

Opened 3 years ago

Last modified 22 months ago

Investigate possible memory leak

Reported by: nils.toedtmann Owned by: kindly
Priority: awaiting triage Milestone:
Component: ckan Keywords:
Cc: rgrp, pudo Repository: ckan
Theme: none

Description

There is some evidence pointing to CKAN handling memory inefficiently or even leaking under certain conditions:

When we migrated ckan.net/thedatahub.org from eu7.okfn.org (32bit) to s053.okserver.org (64bit) (ticket) we experienced extraordinary memory usage peaks (ticket). Here are the observed value with Apache default settings:

  • eu7, mpm-prefork: base level ~0.6GB, peaks up to 2GB
  • s055, mpm-prefork: base level ~1GB, peaks up to 4GB
  • s055, mpm-worker: base level ~1.5GB, peaks up to 6GB

William reduced the life-time of a WSGI CKAN process from 500 requests down to 25 requests (changeset). This (together with two other tweaks) changed the situation drastically:

  • s055, mpm-event: base level ~1.4GB, no peaks

This suggests that the more requests a CKAN processes serves over time, the more memory it consumes, aka bad memory management or a leak.

To prove this theory, one could reduce the total number of WSGI CKAN processes as much as possible without killing the performance (e.g. down to processes=3), and then observing the relation between maximum-requests=25...500 and memory consumption.

On 14/09/11 17:49, David Read wrote:

Someone to do a bit of top-down memory-use profiling would be very useful. Also useful would be something in the tests that reported what test cases use lots of memory - this could be in the nose plugin.

+1

Change History

comment:1 Changed 2 years ago by nils.toedtmann

This becomes an actual problem on the CKAN farm s057, see http://trac.okfn.org/ticket/1245

comment:2 Changed 2 years ago by nils.toedtmann

See #2485 for workarounds containing the leak(s).

comment:3 Changed 23 months ago by ross

  • Cc thejimmyg removed
  • Owner changed from dread to kindly
  • Status changed from new to assigned

Moved out of milestone so that it gets looked at again soon

comment:4 Changed 22 months ago by amercader

  • Status changed from assigned to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.