discord-api-docs icon indicating copy to clipboard operation
discord-api-docs copied to clipboard

`504 Gateway Time-out` / `500 Internal Server Error` when sending large attachements

Open Kiruyuto opened this issue 5 months ago • 2 comments

Description

According to the attachment_size_limit property for interactions, when a user with Nitro invokes a slash command, the bot should be able to send attachments up to the user's upload limit (500MB for Nitro users). However, when sending files over ~200MB (So far, from testing that is failure hard cap), the result is inconsistent (sometimes it sends, sometimes it doesn't) or it straight up throws an error

This happens with both "regular" file uploads (resulting in a 504 Gateway Time-out) and when using GoogleCloudPlatform buckets for the upload (resulting in a 500 Internal Server Error/{"code":0,"message":"500: Internal Server Error"})

Steps to Reproduce

  1. Have a nitro user invoke slash command
  2. Ensure that attachment_size_limit is equal to 524288000 bytes
  3. Try to send interaction response containing single file that exceeds 200MB but is within the nitro limit (Ive tested it using a 350MB .mp4 file)
  4. ???
  5. Error

Expected Behavior

The file upload is successful and command executes without an error

Current Behavior

The file upload throws Gateway Time-out or Internal Server Error depending on upload method used

Screenshots/Videos

Image

Client and System Information

C#, .NET 9, NetCord version 1.0.0-alpha.399

Kiruyuto avatar Jul 19 '25 14:07 Kiruyuto

Possible duplicate of #7603

Qjuh avatar Jul 19 '25 16:07 Qjuh

Possible duplicate of #7603

It seems to be the same problem but I never received Entity too large as long as I kept the size under attachment_size_limit 🤔

Kiruyuto avatar Jul 19 '25 19:07 Kiruyuto