Back

Operation timed out after 900001 milliseconds with 0 bytes received with status code 0

  • 0
  • Functions
BugProg
28 Apr, 2023, 16:20

Hi !

I try to upload my nodeJS function to appwrite. The total bundle size is 130MB, it's due too big jsons files stored alng side to my index.js. Appwrite stucks on the "building" phase and get this error 20 minutes later: Operation timed out after 900001 milliseconds with 0 bytes received with status code 0. I tried to upload my function with only one json and it works perfectly because the bundle is smaller than the previous. But I need to have all my Jsons files to execute the function, do you have an idea how to resolve the issue ? I don't know why Appwrite need so much time to building the project with only one JS file and big JSON files, there is nothing to compile ? no ?

Thank you so much for your help !

TL;DR
Title: Operation timed out error when uploading nodeJS function with large JSON files Messages: The user is experiencing a timeout error when trying to upload a nodeJS function to Appwrite. The function includes large JSON files, resulting in a bundle size of 130MB. Uploading the function with only one JSON file works fine, but the user needs all the JSON files for the function to work. They are looking for a solution to resolve this issue.
Binyamin
28 Apr, 2023, 16:30

What is the value of _APP_FUNCTIONS_SIZE_LIMIT in your .env file? https://appwrite.io/docs/environment-variables#functions

Drake
28 Apr, 2023, 17:37

why do you need the JSON files in the function code?

BugProg
28 Apr, 2023, 17:38

Hi ! Thank you for your answer ! Yes I already edited the variable: _APP_FUNCTIONS_SIZE_LIMIT=1200000000. It's enough for my needs.

BugProg
28 Apr, 2023, 17:39

Hi ! Thank you for your message ! It's just data, about GPS coords

BugProg
28 Apr, 2023, 17:40

Data are not directly available through an API so I have to download my self on my folder project.

BugProg
28 Apr, 2023, 17:41

But now I uploaded the files on Appwrite Storage and try to fetch the files when I need it.

Binyamin
28 Apr, 2023, 17:41

Quick workaround would be to host it in your Appwrite inside a storage bucket, Then anytime the function is cold-booted you'll fetch the files.

Binyamin
28 Apr, 2023, 17:41

Exactly

Binyamin
28 Apr, 2023, 17:41

That would work perfect if your function have a long threshold

BugProg
28 Apr, 2023, 17:42

Yes, thank you ! I hop too πŸ™‚ I will try this and I will keep you informed

BugProg
28 Apr, 2023, 17:56

Ok it works perfectly πŸ˜€ but is slower

Binyamin
28 Apr, 2023, 17:56

Slower the loading process or in general?

BugProg
28 Apr, 2023, 17:57

The time between sending the request and receiving the data

BugProg
28 Apr, 2023, 17:57

almost 3s

Binyamin
28 Apr, 2023, 17:59

You can first try this. Run the function And in your server run docker stats to see if there's any CPU / Memory spikes

BugProg
28 Apr, 2023, 18:01

I think the wait is coming from the file. It's a big file 50m and clould have some delays before it downloaded completely no ?

Binyamin
28 Apr, 2023, 18:02

Yes, but after that you're loading the file into the memory?

Binyamin
28 Apr, 2023, 18:03

It's a big file though maybe in this case it will be better to try with a different runtime for better performance

BugProg
28 Apr, 2023, 18:03

with docker stats everything is ok just when in triggered the function

BugProg
28 Apr, 2023, 18:04

Yes maybe, or find a way to have my files along with the index.js ?

BugProg
28 Apr, 2023, 18:04

I think building time is long because Appwrite try to replace global variable into my files.

Binyamin
28 Apr, 2023, 18:05

I don't think this would made your function slower. Because after cold booting the function then it's like you've upload the files with the function.

It's true that each cold boot would be a bit longer because the function will have to fetch files.

BugProg
28 Apr, 2023, 18:09

I don't think this would made your function slower. Yes I think too but for the moment is not working at all, I get timeout error.

BugProg
28 Apr, 2023, 18:12

Anyway thanks for your help<:appwriteheart2:1073243188954935387> , I hope there will be a fix later!

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