~tsileo/microblog.pub#73: 
Media Proxy Key Error?

Following Error throws 500 when trying to serve media proxy sometimes?

INFO: 145.14.124.130:0 - "GET /proxy/media/19331/y6dQF8y8LBmZt9GG9UcoHgULva14sWgZZcVsZxzxtKA%3D/aHR0cHM6Ly9jZG4ubWFzdG8uaG9zdC9tYXN0b2RvbmFydC9tZWRpYV9hdHRhY2htZW50cy9maWxlcy8xMDkvNDIyLzgxMC8zMzcvMzEwLzM3NC9vcmlnaW5hbC9iMGVmMjQ4YmIzMmMzNTVmLmpwZWc%3D/740 HTTP/1.1" 500 Internal Server Error ERROR: Exception in ASGI application Traceback (most recent call last): File "/home/ubuntu/.cache/pypoetry/virtualenvs/microblogpub-w8qPhqp5-py3.10/lib/python3.10/site-packages/h2/connection.py", line 224, in process_input func, target_state = self.transitions[(self.state, input)] KeyError: (<ConnectionState.CLOSED: 3>, <ConnectionInputs.SEND_HEADERS: 0>)

Status
RESOLVED CLOSED
Submitter
~acegiak
Assigned to
No-one
Submitted
2 years ago
Updated
2 years ago
Labels
No labels applied.

~tsileo 2 years ago

Hey,

It looks like there was an error communicating with the origin server, since media are proxied on the fly, this is bound to happen (as sometimes a server may just be down, sometimes it may be a transient error).

Maybe we could try to add an HTTP retry in the HTTP client proxying the remote media.

I will take a look.

Thanks!

~tsileo 2 years ago

I tried to enable an additional retry on the HTTP client, we will see if that helps.

~acegiak 2 years ago

Ok so I installed that update and things were going good and then after a while started running into the same issue again. Stopping the MBP process and restarting it makes it start working again. It might be, seems to me, that it degrades over time?

On Monday, November 28, 2022, ~tsileo outgoing@sr.ht wrote:

I tried to enable an additional retry on the HTTP client, we will see if that helps.

-- View on the web: https://todo.sr.ht/~tsileo/microblog.pub/73#event-215808

~acegiak referenced this from #73 2 years ago

~tsileo 2 years ago

I've done a bit more research, and it looks like the HTTP2 client can become unstable. I've switched it back to HTTP1. Before we already tried HTTP1 but without the retries.

I have it running this whole afternoon and I have all the media loading correctly so far.

~tsileo REPORTED CLOSED 2 years ago

Register here or Log in to comment, or comment via email.