Skip to content

Web application memory leaks #269

@lemon24

Description

@lemon24

My nano instance ends up hanging every week due to running out of memory.

The main users are:

  • 2x uWSGI processes running the web app
  • 1x reader update --workers 4 process running on the hour (RSS measurements here)

Mitigations (that don't have to do with reader):

  • use swap
  • uWSGI reload-on-rss and max-requests
  • earlyoom (or oomd), e.g. earlyoom --prefer uwsgi or earlyoom --prefer 'reader update --workers'

Some observations:

  • The web app has been getting fatter lately, e.g. entry read time (added in 2.6) is calculated for both / and /entry (and not cached).
  • Both / and /?limit=64 are leaking memory (keep refresing page, see worker RSS increase).
    • While we are streaming the response, we are keeping the entries in a list before doing so; / increases worker RSS to over 100MB.
  • /entry is leaking memory as well.
  • /enclosure-tags is not leaking memory.

This issue is to look if anything can be fixed on the reader side.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions