Yappi error "context not found"
Brian
dribnairb at gmail.com
Thu Feb 10 08:38:43 EST 2011
I'm posting here because I can't find a Yappi specific mailing list.
I've been using the rather brilliant Yappi from http://code.google.com/p/yappi/
It works well for small programs with a few threads. However, when
trying to run it over large programs with several hundred threads I've
been getting the error "context not found".
The most basic example I can come up with which illustrates the
problem is below. Changing the number of threads started from 25 down
to, say, 10, works fine. Any more than ~25 and the error keeps
appearing. This is using Python 2.6.5 and Ubuntu Linux 10.04. I don't
have another box to try this out on at the moment.
I've tested a similar script using thread.start_new_thread() and that
doesn't seem to have the problem. So is there some issue with Yappi
and inheriting from threading.Thread?
import yappi
import time
import threading
class MyThread(threading.Thread):
def run(self):
time.sleep(1)
yappi.start()
for i in range(0,25):
c = MyThread()
c.start()
time.sleep(1)
yappi.print_stats()
yappi.stop()
Running the above gives:
[*] [yappi-err] context not found.
[*] [yappi-err] context not found.
[*] [yappi-err] context not found.
[*] [yappi-err] context not found.
...
Any help appreciated.
More information about the Python-list
mailing list