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

Investigate Sentry error: TaskStopped #206

Open
callahad opened this issue Apr 2, 2021 · 5 comments
Open

Investigate Sentry error: TaskStopped #206

callahad opened this issue Apr 2, 2021 · 5 comments

Comments

@callahad
Copy link
Contributor

callahad commented Apr 2, 2021

Our monitoring for Syngal on matrix.org occasionally sees an error:

Unexpected exception from twisted.web.client.FileBodyProducer.stopProducing

The traceback is:

TaskStopped: null
  File "twisted/web/_newclient.py", line 197, in _callAppFunction
    function()
  File "twisted/web/client.py", line 1161, in stopProducing
    self._task.stop()
  File "twisted/internet/task.py", line 497, in stop
    self._checkFinish()
  File "twisted/internet/task.py", line 507, in _checkFinish
    raise self._completionState

So... what causes this to happen? Can we handle the error more gracefully?

(For Element employees, this is https://sentry.matrix.org/sentry/sygnal-matrixorg/issues/15235/)

@H-Shay
Copy link
Contributor

H-Shay commented Apr 5, 2021

I am wondering if this error is related to this issue: https://twistedmatrix.com/trac/ticket/9929

@clokep
Copy link
Member

clokep commented Apr 5, 2021

@richvdh
Copy link
Member

richvdh commented May 7, 2021

I think this needs this code from Synapse ported to Sygnal: https://github.com/matrix-org/synapse/blob/15090de85075c9d7d54479b4bfd79057de64059b/synapse/http/__init__.py#L43-L54

I would love it if we could shove all this sort of thing in a matrix-twisted-utils library or something so that we don't have to implement it individually in each of synapse, sygnal and sydent.

@clokep
Copy link
Member

clokep commented May 7, 2021

In this case it seems like we could also try to fix the Twisted bug?

@richvdh
Copy link
Member

richvdh commented May 7, 2021

well, true.

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

No branches or pull requests

4 participants