Skip to content

Memory leak in feed view? #320

@tomcardoso

Description

@tomcardoso

I'm seeing the app restart every hour or so due to running out of memory. The memory usage chart looks like a classic memory leak:

image

I installed Scout APM to track down what might be causing it. It seems calling WatchingController#feed adds 16mb each time it's called. A breakdown suggests that the feed change template is responsible:

https://github.com/themarshallproject/klaxon/blob/develop/app/views/watching/_feed_change.html.erb

Same thing with this Changes template:
https://github.com/themarshallproject/klaxon/blob/develop/app/views/changes/page.html.erb

I'm no expert with memory leaks in Rails, but happy to help try and track this down if someone's able to help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions