Skip to content

Memory leak with Django 1.7 and --create-db? #181

Closed
@alvinchow86

Description

@alvinchow86

Hey, I noticed some very strange memory usage issues lately. I'm using pytest-django 2.7 and Django 1.7, with Postgres 9.3 (+PostGis) as the database.

Basically if I run py-test on my test suite with --create-db (to create a new database), my Python process balloons to 700-800MB right off the bat (while the database is being created, and Django migrations are run), and stays at least that high (800MB+) throughout the test run. This is leading to out-of-memory issues on our integration server.

If I don't do --create-db and reuse the existing test database (--reuse-db), memory usage is normal (~150-200MB) throughout the test run.

When I was using Django 1.6 and pytest-django 2.6.2, there was no difference in memory between reusing and creating the test DB.

Any ideas? The main difference is that I'm using Django 1.7's migrations now (used to use South with Django 1.6, and --create-db just skipped South entirely).

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