WordPress / openverse

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
https://openverse.org
MIT License
240 stars 194 forks source link

RuntimeError: unable to perform operation on <TCPTransport closed=True reading=False 0x55dc68caf9f0>; the handl... #4901

Open sentry-io[bot] opened 3 weeks ago

sentry-io[bot] commented 3 weeks ago

Sentry Issue: OPENVERSE-API-YE

RuntimeError: unable to perform operation on <TCPTransport closed=True reading=False 0x55dc68caf9f0>; the handler is closed
  File "uvloop/sslproto.pyx", line 714, in uvloop.loop.SSLProtocol._do_read
  File "uvloop/sslproto.pyx", line 699, in uvloop.loop.SSLProtocol._process_outgoing
  File "uvloop/handles/stream.pyx", line 674, in uvloop.loop.UVStream.write
    self._ensure_alive()
  File "uvloop/handles/handle.pyx", line 159, in uvloop.loop.UVHandle._ensure_alive
    raise RuntimeError(

Fatal error on SSL protocol
protocol: <uvloop.loop.SSLProtocol object at 0x7fbb6a8681a0>
transport: <TCPTransport closed=True reading=False 0x55dc68caf9f0>
sarayourfriend commented 3 weeks ago

I thought this would be fixed in https://github.com/WordPress/openverse/pull/4875, but they are still happening.

This error is worrisome because there is very little visibility into what the effect of it is, and it's been difficult to understand exactly where it comes from, what causes it, or even when it happens.

My suggested plan of action to try to address this is, unfortunately, purely speculative. It is as follows:

sarayourfriend commented 1 week ago

@WordPress/openverse-api is anyone interested in taking this on? I've recommended a list of actions to try in the previous comment. I ordered them based on my estimation of how much effort they would take, and I would suggest trying them in that order unless you disagree with my relative estimations. After each one, we would need to deploy to production and see whether the RuntimeError is still happening.

Please ping me on any PRs that open as a result of this issue. I think someone in @WordPress/openverse-api should drive the work itself so that the understanding of it is within that group of maintainers, but I am happy to advise, review, and lend any other support to anyone working through this.