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

Large File upload causes timeout #1108

Closed
DestroyerAlpha opened this issue Sep 2, 2022 · 11 comments · Fixed by #1148
Closed

Large File upload causes timeout #1108

DestroyerAlpha opened this issue Sep 2, 2022 · 11 comments · Fixed by #1148

Comments

@DestroyerAlpha
Copy link

What happened

I was experimenting different file size uploads to my slack workspace. The client timed out with a file size of about 50MB. The timeout happens after 20secs consistently.

Expected behavior

Send the file

Steps to reproduce

slackClient.UploadFile as well as slackClient.UploadFileContext with 1 minute context timeout, both fail with:

slack-go/slack2022/09/02 14:00:08 misc.go:272: HTTP/2.0 408 Request Timeout
Content-Length: 14
Content-Type: text/plain
Date: Fri, 02 Sep 2022 08:30:08 GMT
Server: envoy
Via: envoy-edge-bom-qrmq
X-Edge-Backend: envoy-www
X-Slack-Edge-Shared-Secret-Outcome: no-match

stream timeout

reproducible code

manifest.yaml

Versions

  • Go: 1.18
  • slack-go/slack: 0.10.2
@flowHater
Copy link

It seems to be a serverside timeout.
The default timeout for the http.Client{} is 0. which means no limit.
The python lib for Slack got the same issue: slackapi/python-slack-sdk#1165

As I can understand, they implemented an other function after exposing an other way in the Slack backend to upload File. They explained that here: https://github.com/slackapi/python-slack-sdk/releases/tag/v3.19.0

@DestroyerAlpha
Copy link
Author

Any plans for similar support on slack-go

@sarthak-kothari
Copy link

Any plans on updating the API? Seeing similar issues

@kanata2
Copy link
Member

kanata2 commented Dec 11, 2022

@flowHater Thanks for your investigation!

@kanata2
Copy link
Member

kanata2 commented Dec 11, 2022

I'm reviewing @sarthak-kothari's PR (#1130) now.

@kanata2
Copy link
Member

kanata2 commented Dec 17, 2022

Released v0.12.0 which includes #1130.

@kanata2 kanata2 closed this as completed Dec 17, 2022
@ghost
Copy link

ghost commented Dec 18, 2022

Hey @kanata2 no #1130 in https://github.com/slack-go/slack/releases/tag/v0.12.0

@kanata2
Copy link
Member

kanata2 commented Dec 18, 2022

Oh...sorry.

@kanata2 kanata2 reopened this Dec 18, 2022
@flowHater
Copy link

@kanata2
Can we expect a release soon with this patch ? Or are you waiting more commits to bundle the whole in a larger release ?

@flowHater
Copy link

What I saw, is that there is still pending comments on the MR, so It's not merged and so cannot be released.

@DestroyerAlpha
Copy link
Author

@kanata2 Would it be possible to make UploadFileV2 analogous to UploadFile. The naming of the params struct as well as the expected parameters are different (e.g. UploadFile accepted a slice of channel IDs whereas UploadFileV2 only accepts a single channel as parameter.)

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

Successfully merging a pull request may close this issue.

4 participants