[bug] Mint HTTP2 causes S3 uploads to fail #978
Labels
No labels
approved, awaiting change
broken setup
bug
cannot reproduce
configuration
documentation
duplicate
enhancement
extremely low priority
feature request
Fix it yourself
help wanted
invalid
mastodon_api
needs change/feedback
needs docs
needs tests
not a bug
not our bug
planned
pleroma_api
privacy
question
static_fe
triage
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
AkkomaGang/akkoma#978
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Your setup
From source
Extra details
Fedora
Version
develop
PostgreSQL version
16
What were you trying to do?
Upload an image to s3 via the standard uploader
What did you expect to happen?
No response
What actually happened?
looks like we might need to modify how these uploads work
see: https://hexdocs.pm/mint/Mint.HTTP2.html#request/5-request-body-size
Logs
Severity
I cannot use it as easily as I'd like
Have you searched for this issue?
if anyone else runs into this, switching
will rectify the issue until i can figure out the best way to solve this
So, as the linked Mint docs suggest, if using Mint directly one should use
streamandget_window__sizeto split it into appropriately sized chunks.We’re using Mint via Tesla via Finch, which does in fact already handle this for us since Finch#158 — IF using its HTTP2 pool setup, i.e.
protocols: [:http2].As mentioned in the PR enabling
protocols: [:http1, :http2]by default, if both HTTP versions are supported Finch currently cannot take full advantage of al HTTP2 features due to its own limitations.That is, because it still uses the HTTP1 pooling logic for multi-protocol setups and as a result
window_sizeis not taken care of and we’re runing into this Finch bug: Finch#265Afaict Finch doesn’t expose any way to retrieve MInt’s
get_window_size, so there’s no way to work around it on our end, short of forcingprotocol: [:http1]for requests with a body :\If we want to keep using Finch, I’m afraid
[:http1, :http2]will only work reliably for body requests if the above bug is solved (which likely though means, Finch got a way of determining the protocol after ALPN negotation and using the most appropriate pool and thus now can take full advantage of HTTP2 features for multi-protocol configartions)