Skip to content

post fork memory leak #84

@clutchski

Description

@clutchski
  • Django 1.8.14
  • uWSGI 2.0.14
  • ddtrace 0.3.15

if you run the app with uwsgi process forking and use the tracer before the fork, we'll leak traces.

to repro here's a small flask app:

# use tracing right away
from ddtrace import tracer

# start a dummy trace here to ensure we start tracing
# before we fork.
with tracer.trace("aaaa"): pass

app = Flask(__name__)
traced_app = TraceMiddleware(app, tracer, service="foo")

@app.route('/')
def foo():
    return 'hello'

and run with:

uwsgi -p 4 --http :9090 --manage-script-name --mount /=path:app --enable-threads

or

git clone https://github.com/DataDog/trace-examples
cd python/flask
rake uwsgi

workaround: run with --lazy-apps

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions