KeyError: frame = sys._current_frames()[thread_id]

Issue #24 new
Board Genius created an issue

KeyError at dogslow/__init__.py in peek, line 226

Python Version: 2.7.15

gunicorn version 19.9.0

Django version 1.11.29

dogslow==1.2

Comments (2)

  1. Board Genius reporter

    A tad more info; I traced some variables. In one case, dogslow is looking for thread_id 139760463324008 but these are the available thread IDs from sys._current_frames()

    [139760441603840, 139760449996544, 139760657008448]

  2. Marti R.

    I think it’s possible to hit a race condition, where the thread handling the request finishes only just after the Dogslow timer triggers. That would cause this error.

  3. Log in to comment