Skip to content
This repository was archived by the owner on Oct 23, 2023. It is now read-only.
This repository was archived by the owner on Oct 23, 2023. It is now read-only.

IndexError: pop from empty list on request finished signal handler #997

Open
@raphael-riel

Description

@raphael-riel

Raven-Python 6.0.0 on Django 1.9.13

All affected requests are HEAD. But not all HEAD requests are affected. Neither all of the exact same requests(Uptime tracking system) are affected.

IndexError: pop from empty list
  File "raven/middleware.py", line 20, in common_exception_handling
    yield
  File "raven/middleware.py", line 71, in close
    self._close()
  File "django/http/response.py", line 252, in close
    signals.request_finished.send(sender=self._handler_class)
  File "raven/contrib/django/middleware/__init__.py", line 111, in request_finished
    client.transaction.pop(self._txid)
  File "raven/utils/transaction.py", line 47, in pop
    return self.stack.pop()

Could this be caused by a request_finished sent without having the prerequisite request_started ? I suspect a premature close of the TCP/HTTP connection causing the request cycle behave in a weird manner.

On a 7days range, this error happens on few candidates (<10) over a very large sample (100,000+) of identical requests spread across tens of dockers hosts running the same codebase.

2017-05-05 at 7 29 am
2017-05-05 at 7 44 am

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions