Back

Sending any file larger larger than 1MB to a function results in a constant delay

  • 0
  • Self Hosted
  • Functions
  • Cloud
Joshi
15 Sep, 2024, 16:15

Appwrite 1.6. Applies to Selfhosted and cloud.

As you can tell from the image, the 600kb and 1MB file take the same amount of time. If we increase the size only by 0.1MB it will result in a constant response time of around 3.5s when using the Dart runtime. When I use the Go runtime it will always take around 2.9s and on PHP it is always around 3.9s. Any file bigger than 2MB do not even work and will result in \nError Code: 413

I use a custom function domain and enabling or disabling logging has no effect.

TL;DR
Function experiences delay when processing files larger than 1MB, with consistent times indicating potential `sleep(3)` when payload exceeds limit. Suspected limit may be 2MB instead of 20MB due to timing patterns. Dart runtime consistently takes 3.5s, Go takes 2.9s, and PHP takes 3.9s. Files over 2MB trigger `\nError Code: 413`. Logging settings do not impact issue. Check Discord thread for more info. Additionally, to troubleshoot, review the code for any deliberate sleeps or delays upon file size evaluation.
Joshi
15 Sep, 2024, 16:18

Maybe they forgot a zero somewhere because so far the limit seems to be 2MB instead of 20MB.

Joshi
15 Sep, 2024, 16:19

The delay is so consistent every time which makes me think they put a sleep(3) when payload > 1MB lmao

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more