Answer the question
In order to leave comments, you need to log in
WSGI, Django. How to see which part of the code each worker is executing at a particular moment?
There is a Django application running under UWSGI.
4 workers.
I want to be able to see exactly which part of the code each worker performs at any time.
Found this thing projects.unbit.it/uwsgi/wiki/TipsAndTricks (first point Retrieving a stack trace on request)
Pasted this code into the wsgi.py of the project,
and…
it doesn’t work a bit as expected
If the worker does some work, and I send a signal at this point in time (since I want to see what exactly my worker is doing right now), then my worker is working as usual and only then a traceback is shown for the point in time when the worker has already worked, of course there is no useful information there just something like
# ThreadID: -1224046912 (MainThread)
File: "./wsgi.py", line 56, in thread_dump
What did I do wrong, or is there any other way I could try.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question