Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

post fork memory leak #84

Closed
clutchski opened this issue Nov 1, 2016 · 1 comment
Closed

post fork memory leak #84

clutchski opened this issue Nov 1, 2016 · 1 comment

Comments

@clutchski
Copy link
Contributor

clutchski commented Nov 1, 2016

  • 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

@clutchski clutchski changed the title django memory leak post fork memory leak Nov 1, 2016
clutchski added a commit that referenced this issue Nov 1, 2016
this will alleviate case #84, though we should probably
roll it into #79.
@clutchski
Copy link
Contributor Author

clutchski commented Nov 2, 2016

should be fixed by #88. testing internally now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant